Any time I use it, I wish python had just gone with the normal ternary (? :) operator.
No, python writes the ternary operator with words, it doesn't have rightward conditionals.
The key difference is that the else clause is required in the Python ternary, where it's optional in a conditional.
No, python writes the ternary operator with words, it doesn't have rightward conditionals.
The key difference is that the else clause is required in the Python ternary, where it's optional in a conditional.