Hi,

I am doing python code challenges, and I am on lists.

I want to make a loop using “range()”, but I don`t know how to write it. Can anyone help?

The code:

def append_sum(first):

first.append(first[-1] + first[-2])

first.append(first[-1] + first[-2])

first.append(first[-1] + first[-2])

return first

The solution also has “1st” written instead of “first”, but I don`t know how that is possible, can anyone explain it to me?