Testing if a list exist

joonas keisari_ at hotmail.com
Thu Dec 21 10:20:08 EST 2000


How can I test if a list exists or not.

I have used

##############
try:
 temp = mylist
except:
 #do stuff if mylist does not exist
else:
 #do sfuff if mylist exists
##############


Is there any better way to do that?

Joonas.



More information about the Python-list mailing list