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

Programmer Humor

24834 readers
823 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
[–] entropicdrift@lemmy.sdf.org 141 points 3 weeks ago (39 children)
print("odd" if num % 2 else "even")

That's the native python version, for those curious

[–] DreadPirateShawn@lemmy.blahaj.zone 89 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.

[–] balsoft@lemmy.ml 22 points 3 weeks ago* (last edited 3 weeks ago) (4 children)

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

[–] Shareni@programming.dev 16 points 3 weeks ago (1 children)

Lisps makes more sense to me though

(if condition a b)

VS

a if condition else b

[–] balsoft@lemmy.ml 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)