summaryrefslogtreecommitdiff
path: root/progs/a687.py
blob: b189d1686b5f9de90abfca6dfbe4dc430bad1b87 (plain)
1
2
3
4
5
6
7
8
9
def sum_of_alternates(test_tuple):
  sum1 = 0
  sum2 = 0
  for idx, ele in enumerate(test_tuple):
    if idx % 2:
      sum1 += ele
    else:
      sum2 += ele
  return ((sum1),(sum2))