I have a list that contain days count in each month:
month = [31,28,31,30,31,30,31,31,30,31,30,31]
I want to transform list above. Each element of the new list is equal to the sum of all elements in a particular position. For example, first element should be the same (31), second = 28+31, third = 31+28+31 and so on. Desired output:
month = [31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365]
How to do it? I tried variations with a for loop and append method, but I did not succeed.