566
you are viewing a single comment's thread
view the rest of the comments
[-] entropicdrift@lemmy.sdf.org 136 points 1 day ago
print("odd" if num % 2 else "even")

That's the native python version, for those curious

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 1 day ago

At least you guys have ternary syntax cries in kotlin.

[-] Aqarius@lemmy.world 2 points 18 hours ago

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

load more comments (23 replies)
load more comments (33 replies)
this post was submitted on 12 Jun 2025
566 points (98.6% liked)

Programmer Humor

24143 readers
1801 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