2 ms·
s for s in [0] # for every s of 0 (there is only one) for x in data # for every x in data for s in [s + x] # s is s + x. so s = 0 + x[0], then s =
by nurettin 6y ago
s
for s in [0] # for every s of 0 (there is only one)
for x in data # for every x in data
for s in [s + x] # s is s + x.
so s = 0 + x[0], then s = (0 + x[0]) + x[1], then (0 + x[0] + x[1]) + x[2] it results in an array of rolling sums.
Edit: someone already answered, I am blind.