I'm quite new to Python and trying to do something but cannot figure out how...
x = 20
list = [5, 3, 7]
I want to create a loop that add the previous element from the list to x
Loop 1 : result = 20+0 = 20 (no previous element)
Loop 2 : result = 20+5 = 25
Loop 3 : result = 20+5+3 = 28
So at the end result should look like that : result = [20, 25, 28]
Any idea how I could achieve this result ?
Thank you for your help!
x,10or20?