In the mentioned code I expect output as `0 1 2 3`, but I got an output which is `0 1 2 2`.Please help me why it is so? , how it is working.This is the code of my problem statement.

```
a = [0, 1, 2, 3]
for a[-1] in a:
    print(a[-1])

```

This is code in python, output got is `0 1 2 2`