Compute the cumulative sum of a list using a loop or Python's built-ins.
Constraints
Example
>>> cumulative_sum([1, 2, 3, 4]) [1, 3, 6, 10] >>> cumulative_sum([1, 2, 3]) [1, 3, 6] >>> cumulative_sum([]) []
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints