On Wed, 14 Dec 2005 14:09:10 -0500, Andy Leszczynski wrote: > How can do elegantly in Python: > > if condition: > a=1 > else: > a=2 > > like in C: > > a=condition?1:2
I thought you wanted to do it *elegantly*? Your first solution is perfectly elegant to my eyes, unlike that horrible C syntax. -- Steven. -- http://mail.python.org/mailman/listinfo/python-list