As we all know, for Python, we could easily assignment multiple variables in one line. But here I encounter a strange situation. Say we have a list:
x = [1, 2, 3, 4]
And then, we do
x[0], x[x[0]] = 2, 1
Finally, we would get
x = [2, 2, 3, 4]
instead of
x = [2, 1, 3, 4]
Could anyone explain what is going wrong here? How would python implement the multiple variables assignment in one line?
Thanks in advance.