I have a list of tuples (always pairs) like this:
[(0, 1), (2, 3), (5, 7), (2, 1)]
I\'d like to find the sum of the first items in each pai
A version compatible with Python 2.3 is
sum([pair[0] for pair in list_of_pairs])
or in recent versions of Python, see this answer or this one.