- cross-posted to:
- python@programming.dev
- cross-posted to:
- python@programming.dev
You must log in or register to comment.
I raise you
@lambda _: _() def result() -> int: global a; global b; a, b = b, a
hat tip to @sisyphean@programming.dev via Cursed Python
Haha thanks, but the original idea is from
@goodside
on Twitter, I just screenshotted his tweet and harvested the upvotes :DD’oh, you’re right! My bad and thanks for the catch!
a = a ^ b b = a ^ b a = a ^ b
Storing the value in the user instead of RAM!
This actually raises a very good question - could you increase the amount of available RAM by using the user?
Juggling chainsaws comes to mind.