How to check if a list exists in Python
python
Solution
For the lists:
if a_list:
print "I'm not here"
The same is for the dicts:
if a_dict:
print "I'm not here"
Problem
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,