get specific key value from dictionary python code example
Example 1: how to get key of a particular value in dictionary python using index
mydict = {'george': 16, 'amber': 19}
print(list(mydict.keys())[list(mydict.values()).index(16)]) # Prints george
Example 2: how to get a specific key in a dictionary python
>>> print(fruit.get('kiwi'))
2.0