a = 1
b = 2

a ^= b
b ^= a
print(a,b) # 3 1

why?