this post was submitted on 12 Jun 2025
577 points (98.7% liked)

Programmer Humor

24772 readers
1146 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 140 points 3 weeks ago (39 children)
print("odd" if num % 2 else "even")

That's the native python version, for those curious

[–] [email protected] 87 points 3 weeks ago (26 children)

The ternary syntax is really my only real gripe with python design -- putting the conditional BETWEEN the true and false values feels so very messy to me.

[–] [email protected] 22 points 3 weeks ago* (last edited 3 weeks ago) (4 children)

Eh, reads pretty naturally to me. That said, (like I lisp)

[–] [email protected] 16 points 3 weeks ago (1 children)

Lisps makes more sense to me though

(if condition a b)

VS

a if condition else b

[–] [email protected] 9 points 3 weeks ago

I was more talking about (+ a b) and such.

load more comments (2 replies)
load more comments (23 replies)
load more comments (35 replies)