LearnPy Hub
← NumPy problems
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]
solution.py
Output appears here
Cumulative Sum · Python practice problem · LearnPy Hub