Conditional Expressions in Python 2.4
A.M
alanalan at newsgroup.nospam
Fri Jun 2 13:09:08 EDT 2006
Previous message (by thread):
Conditional Expressions in Python 2.4
Next message (by thread):
Conditional Expressions in Python 2.4
Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
>>
a = 1 == 1 and "Yes" or "No"
>>
a = ("No", "Yes")[1 == 1]
Smart! Thanks alot.
Previous message (by thread):
Conditional Expressions in Python 2.4
Next message (by thread):
Conditional Expressions in Python 2.4
Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-list mailing list