Possible Duplicate:
sum each value in a list of tuples
I need help with this problem, Thank you in advance for your colaboration. I would like obtein this:
result=[12,15,18]
from
a= [[1,2,3],[4,5,6],[7,8,9]]
I am trying with the code below that works, but I would like find a general form for to do this in the case the internal lists could be variables.
lista=[[5, 7, 9], [8, 11, 13], [11, 13, 15]]
b2 = [lista [0][i]+ lista [1][i] + lista [2][i] for i in range(len(lista))]
print (b2)
Thank you very much.