Peter Otten wrote: > Daniel Crespo wrote: >>new_variable = (variable) ? True : False; >>in Python in one line?
> new_variable = variable Of course to answer your actual question: new_variable = variable and True or False But you should consider that Peter has given you a better answer than you think. <yoda> Don't try to force everything to the type you expect, use things as they are; embrace duck-typing. </yoda> :-) --Scott David Daniels [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list