How can I tell if variable is defined

Brown, Rodrick rodrick.brown at citi.com
Tue Sep 22 14:03:25 EDT 2009


How could I do the following check in Python

In Perl I could do something like if ((defined($a)) { ... }

I tried if var is not None:
However this doesn't seem to work as described.

Thanks.



More information about the Python-list mailing list