x = 1
y = 2
x, y, z = x, x, y
z, y, z = x, y, z
print(x, y, z)
The answer here is 1 1 2. My question is how does this process work? I would have thought that the answer would have gone as follows:
x = 1, y = 2, z = 1 swap x = 1, x = 2, y = 1
z = 1, y = 1, z = 1 swap x = 1, y = 1, z = 1...