Ternary operator and tuple unpacking -- What am I missing ?

imageguy imageguy1206 at gmail.com
Tue Jan 13 00:08:51 EST 2009


> understand why I get the result shown in line 8.


>7) >>> c,d = n if n is not None else 0,0
>8) >>> print c,d
>9) (22, 11) 0

OOPS sorry that should be line 9.

g.



More information about the Python-list mailing list