If you want the output of a reduce
to be a tuple, all the intermediate results should also be a tuple.
a = [(1, 2), (1, 4), (1, 6)]
print reduce(lambda x, y: (x[0] + y[0], x[1] + y[1]), a)
Output
(3, 12)
Edit: If you want to get (0, 0)
when the list is empty
a = []
print reduce(lambda x, y: (x[0] + y[0], x[1] + y[1]), [(0, 0)] + a)
Output
(0, 0)
Edit 2: Reduce accepts default initializer as the last parameter, which is optional. By using that, the code becomes
a = []
print reduce(lambda x, y: (x[0] + y[0], x[1] + y[1]), a, (0, 0))