I am trying to check if a dictionary is empty but it doesn\'t behave properly. It just skips it and displays ONLINE without anything except of display the m
test_dict = {} if not test_dict.keys(): print "Dict is Empty"
use 'any'
dict = {} if any(dict) : # true # dictionary is not empty else : # false # dictionary is empty