Summing 1D List
Code
total = 0
lst = [2, 4, 6, 8]
for i in range(len(lst)):
total += lst[i]
Memory
total
0
lst
[2, 4, 6, 8]
i
0
Visual
Close
Previous Iteration
Next Iteration
Run All Iterations
Reset