Python is a little tricky because it doesn't have if statements, but I think this is a good alternative.
142
338
3,713
credit to this absolutely wild Stack Overflow post stackoverflow.com/questions/…

9:56 PM · Jan 2, 2021

34
40
1,055
Replying to @ctrlshifti
What actually got me laughing was that poor lonely little -1.
1
0
51
It carries the weight of the world.
0
0
4
Replying to @ctrlshifti
“Not very readable, but pythony :)” can’t decide whether or not code illegibility is Pythonic after all
1
0
35
He or she probably meant, py...fony. (th-fronting)
0
0
0
GIF
Replying to @ctrlshifti
"Not readable, but pythony" is next tier level flaming.
0
0
90
Replying to @ctrlshifti
I knew I wasn’t the only one!
0
0
0
You’re unable to view this Tweet because this account owner limits who can view their Tweets.
I must be the only person left alive who likes C's ternary operator, and as such see no problem with this!
1
0
6
Replying to @ctrlshifti
Thanks God I don't do code reviews in Python. Pythonic my ass xD
0
0
2
Replying to @ctrlshifti
I.. kinda like this better than python's actual ternary operator. I will use this and you can't stop me
0
0
6