I have a list of dictionaries and I am trying to get the dictionary key by its value:
list1 = [{'a':1,'b':2,'c':3},
{'d':4,'e':5,'f':6},
{'g':7,'h':8,'i':9}]
Here I am trying to get the dictionary key if the value 5
exists in the list of dictionaries.
for dic in list1:
for key in dic:
if dic[key] == search_value:
print key