Possible Duplicate:
Python Ternary Operator
I want to print out a string in python. I don't want to do:
if isfemale_bit:
print 'F'
else:
print 'M'
The best I have right now is print ['M', 'F'][int(isfemale_bit)]
?
Is there a better alternative?
I needs my syntactic sugar!!