trinary operator - if then else

Peter Otten __peter__ at web.de
Wed Apr 25 03:02:38 EDT 2007


Alchemist wrote:

> What is Python's version for the trinary if..then..else operator?

true_value if condition else false_value

> Does Python 2.4 support it?

No, it requires 2.5 or later.

Peter



More information about the Python-list mailing list