Suppose I have a list 'A' and I want to iterate through this list using A[-1]
A = [1,2,3,40,50]
for A[-1] in A:
print(A[-1])
Output:
1
2
3
40
40
Can anyone please help me understand what is going on behind the scene? I have some understanding of how interables works but this one is confusing me.