
def sum(indx,listget):
    if (indx-1)>-1:
        return (listget[indx-1]+listget[indx])
    else:
        return listget[indx]

l=[1,2,4,3,1,2,4,4,12]

for i in range(len(l)):
    l[i]=sum(i,l)

print(l)

704a1d4eedfce4d64723123f648c87da72dba7cd
<mask token>

def sum(indx, listget):
    if indx - 1 > -1:
        return listget[indx - 1] + listget[indx]
    else:
        return listget[indx]


<mask token>

def sum(indx, listget):
    if indx - 1 > -1:
        return listget[indx - 1] + listget[indx]
    else:
        return listget[indx]


<mask token>
for i in range(len(l)):
    l[i] = sum(i, l)
print(l)

def sum(indx, listget):
    if indx - 1 > -1:
        return listget[indx - 1] + listget[indx]
    else:
        return listget[indx]


l = [1, 2, 4, 3, 1, 2, 4, 4, 12]
for i in range(len(l)):
    l[i] = sum(i, l)
print(l)


def sum(indx,listget):
    if (indx-1)>-1:
        return (listget[indx-1]+listget[indx])
    else:
        return listget[indx]

l=[1,2,4,3,1,2,4,4,12]

for i in range(len(l)):
    l[i]=sum(i,l)

print(l)
