pyassistant

Cumulative Sum List

Given a list of integers, return a new list where each element in the new list is the sum of itself and all previous elements in the original list.

Example:

Input:
[3, 7, 1, 2]
Output:
[3, 10, 11, 13]

Make sure you return your solution, don't print!

AI

Bot

Another one trying to solve my challenge? Ask if you must, but don't expect spoon-feeding.