Ternary Operator in Python

Roy Smith roy at panix.com
Fri Apr 1 07:53:18 EST 2005


praba kar <prabapython at yahoo.co.in> wrote:

> Dear All,
>     I am new to Python.  I want to know how to
> work with ternary operator in Python.  I cannot
> find any ternary operator in Python.

You answered your own question; there is no ternary operator in Python.  
There was a major debate on this newsgroup a year or so ago on this 
subject, and the decision was quite clear that no such feature would be 
added.

If you google for "python ternary", you will find a huge amount of material 
written on the subject.



More information about the Python-list mailing list