Самый простой - узнать, какой ключ (имя ключа) должен искать:
# suppose your dictionary is
my_dict = {'foo': 1, 'bar': 2}
# check if a key is there
if 'key' in my_dict.keys(): # it will evaluates to true if that key is present otherwise false.
# do something
, или вы также можете сделать это как:
if 'key' in my_dict: # it will evaluates to true if that key is present otherwise false.
# do something