Medium
Cumulative Sum
Print the running total of the numbers with
np.cumsum, as a list.Input
One line of integers.
Output
A list.
Sample 1
Input
1 2 3 4
Output
[1, 3, 6, 10]
Sample 2
Input
5
Output
[5]
Output appears herenp.cumsum, as a list.One line of integers.
A list.
1 2 3 4
[1, 3, 6, 10]
5
[5]
Output appears here