I have just started learning python basics. Going through python basics, I am stuck in this iteration algorithm and I don't have any idea how it works. It is very simple I know but as a new programmer, I don't have a hobby of writing code daily.
Here is the Code
for i in inputlist:
if i > outputlist[-1]:
outputlist.append(i)
return outputlist
What is output list is actually doing what is the meaning of -1 there