this post was submitted on 12 Jun 2025
575 points (98.6% liked)

Programmer Humor

24214 readers
420 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 139 points 3 days ago (38 children)
print("odd" if num % 2 else "even")

That's the native python version, for those curious

[–] DreadPirateShawn@lemmy.blahaj.zone 87 points 3 days ago (25 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.

[–] idunnololz@lemmy.world 4 points 2 days ago (1 children)

At least you guys have ternary syntax cries in kotlin.

[–] Aqarius@lemmy.world 2 points 2 days ago

It's really special to not have ternary, but have Elvis.

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