"praba kar" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
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.  So Kindly
clear my doubt regarding this

There isn't one, and there won't be one unless Guido changes his mind, and that's quite unlikely.

There are a number of workarounds; the most
used one seems to be based on a feature of the
'and' and 'or' operators. I believe Pep 308 has
a summary of the different ways you can do it,
and the advantages and drawbacks of each.

John Roth



__________________________________
Yahoo! Messenger
Show us what our next emoticon should look like. Join the fun.
http://www.advision.webevents.yahoo.com/emoticontest

-- http://mail.python.org/mailman/listinfo/python-list

Reply via email to