Suppose I have two lists of the same size in Python, the first:
[100, 200, 300, 400]
and I want the other to be:
[0, 100, 300, 600]
which is each element in the 2nd list equals the sum of all previous elements in the first.
Is there a built-in Python function that does such an operation on a list? Or do I have to think about an algorithm to do it?