Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def swap(x, y):
- x = x ^ y
- y = y ^ x
- x = x ^ y
- return x, y
- a, b = swap(2, 3)
- print(a, b) # 3, 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement