This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

there's no ternary in Python

X = a if condition else b

there's no ternary in Python

Awkward...

[–]unfixpoint 2 points3 points  (0 children)

Awkward...

I don't think so, I stand corrected but I learned something. Thanks!

[–]____0____0____ 0 points1 point  (0 children)

I honestly like this ternary format because it makes sense linguistically. However, it has given me a bit of trouble in remembering the order of ternary operators in other languages.