How to check if a list exists in Python

Viewed 45438

What is the easiest way to check to see if a list or dict exists in python ?

Im using the following but this isn't working:

if len(list) == 0:
    print "Im not here"

Thanks,

8 Answers
Related