In Python, I\'ve seen two variable values swapped using this syntax:
left, right = right, left
Is this considered the standard way to swap
I know three ways to swap variables, but a, b = b, a is the simplest. There is
a, b = b, a
x = x ^ y y = y ^ x x = x ^ y
Or concisely,
x ^= y y ^= x x ^= y
w = x x = y y = w del w
x, y = y, x