praba kar 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. So Kindly > clear my doubt regarding this
There is no ternary operator in python. There are several idioms that can be used to emulate one to a certain degree - but they are scolwed on by quite a few people. So better to not use them and just do it in a if: else: clause. -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list