check if a given key exists in a dictionary Sep 13, 2018 if 'key1' in dict: print "blah" else: print "boo" Tagged with python