Say I have a list (This list can have any amount of numbers):
a = [2,5,2,4]
I want to reverse that:
a[::-1]
which gives me [4,2,5,2]
.
Then I want to achieve the sum of the first number, the sum of the first 2 number, the sum of the first 3 number etc.
So I should get:
[4,6,11,13]