trinary operator - if then else

Alchemist alextabone at gmail.com
Wed Apr 25 02:58:10 EDT 2007


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

I want a one-liner such as
  a?b:c
for the if..then..else control structure
if a
  then b
  else c

Does Python 2.4 support it?




More information about the Python-list mailing list