Write a function to get the Cumulative sum of a list


Topic: Write a function to get the Cumulative sum of a list

Solution

 
def Cumulative(lists): 
    cu_list = [] 
    length = len(lists) 
    cu_list = [sum(lists[0:x:1]) for x in range(0, length+1)] 
    return cu_list[1:]
	
	



List all Python Programs