Swapping integers in Python
Swapping integers in Python
5
comments
a = a ^ b b = a ^ b a = a ^ b
6 0 ReplySo you are asking the user to do it
3 0 ReplyNever used Python but that's hilarious.
1 0 ReplyVersion 3 is disgusting.
1 0 ReplyI raise you
@lambda _: _() def result() -> int: global a; global b; a, b = b, a
hat tip to @sisyphean@programming.dev via Cursed Python
1 0 Reply