How to do "new_variable = (variable) ? True : False; " (php) on python?

Peter Otten __peter__ at web.de
Fri Nov 18 14:08:32 EST 2005


Daniel Crespo wrote:

> How can I do
> 
> new_variable = (variable) ? True : False;
> 
> in Python in one line?

new_variable = variable

:-)

Peter
 




More information about the Python-list mailing list