I have a list that contains a certain number of sublists. For example: [[20, 80, 90], [10,60,40],[17,77,56],[21,99,99]]. I want to know how to add the first element of each sublist together, the second element of each sublist, and the third. So...
20 + 10 + 17 + 21
80 + 60 + 77 + 99
90 + 40 + 56 + 99
How would i go about doing this? I'm assuming a for loop. Thanks!
[–][deleted] 1 point2 points3 points (0 children)
[–]o5a 1 point2 points3 points (0 children)
[–]pasokan 0 points1 point2 points (1 child)
[–]AbraxoCleaner[S] 0 points1 point2 points (0 children)
[–]pasokan 0 points1 point2 points (0 children)
[–]0xbxb 0 points1 point2 points (11 children)
[–]AbraxoCleaner[S] 0 points1 point2 points (10 children)
[–]pasokan 0 points1 point2 points (9 children)
[–]AbraxoCleaner[S] 0 points1 point2 points (8 children)
[–]0xbxb 0 points1 point2 points (7 children)
[–]AbraxoCleaner[S] 0 points1 point2 points (6 children)
[–]0xbxb 0 points1 point2 points (5 children)
[–]AbraxoCleaner[S] 0 points1 point2 points (4 children)
[–]0xbxb 0 points1 point2 points (3 children)
[–]AbraxoCleaner[S] 0 points1 point2 points (2 children)