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

Programmer Humor

24815 readers
319 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 132 points 3 weeks ago (33 children)
print("odd" if num % 2 else "even")

That's the native python version, for those curious

[–] DreadPirateShawn@lemmy.blahaj.zone 87 points 3 weeks ago (20 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 3 points 3 weeks ago (2 children)

At least you guys have ternary syntax cries in kotlin.

[–] aubeynarf@lemmynsfw.com 1 points 1 week ago

in Scala, everything is an expression, including “if”, maybe kotlin is the same?

load more comments (1 replies)
load more comments (18 replies)
load more comments (30 replies)