the PHP ternary operator equivalent on Python
Luis M. Gonzalez
luismgz at gmail.com
Wed Nov 23 10:21:18 EST 2005
Previous message (by thread):
the PHP ternary operator equivalent on Python
Next message (by thread):
the PHP ternary operator equivalent on Python
Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
This could be done easier this way: L = [('even','odd')[n%2] for n in range(8)]
Previous message (by thread):
the PHP ternary operator equivalent on Python
Next message (by thread):
the PHP ternary operator equivalent on Python
Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-list mailing list