Write a Python program to get the Cumulative sum of a list


Topic: Write a Python program to get the Cumulative sum of a list

Solution

list1=[10,20,30,40,50]
new_list=[] 
j=0
for i in range(0,len(list1)):
    j+=list1[i]
    new_list.append(j) 
    
print(new_list) 



List all Python Programs