this post was submitted on 12 Jun 2023
107 points (99.1% liked)

Programmer Humor

32710 readers
265 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 3 points 2 years ago (1 children)

I raise you

@lambda _: _()
def result() -> int:
    global a; global b; a, b = b, a

hat tip to @[email protected] via Cursed Python

[–] [email protected] 2 points 2 years ago* (last edited 2 years ago) (1 children)

Haha thanks, but the original idea is from @goodside on Twitter, I just screenshotted his tweet and harvested the upvotes :D

[–] [email protected] 2 points 2 years ago

D'oh, you're right! My bad and thanks for the catch!