I have a for loop with some calculations stored in a list. During second iteration of for loop, the earlier list is replaced with new one. I want to add new list to corresponding entries of old list:
for row in file:
theValue = row.getValue("Value")
if row.getValue("Value") == 20:
..................................
a = ..............................
b = [x*float(theValue) for x in a]
How to add "b" list into the list obtained during the second iteration in above for loop? For example:
b(1) = [2,3,4]
b(2) = [3,5,1]
so I want to get:
b = [5,8,5]
to corresponding entries of old list?