About 2,980,000 results
Bokep
- Viewed 2.5m times960edited Mar 10, 2020 at 22:51mydict = {'george': 16, 'amber': 19}print mydict.keys()[mydict.values().index(16)] # Prints george
Or in Python 3.x:
mydict = {'george': 16, 'amber': 19}print(list(mydict.keys())[list(mydict.values()).index(16)]) # Prints georgeBasically, it separates the dictionary's values in a list, finds the position of the value you have, and gets the key at that position.
More about keys() and .values() in Python 3: How can I get list of values from dict?
Content Under CC-BY-SA license python - Get key by value in dictionary - Stack Overflow
Explore further
Python | Get key from value in Dictionary - GeeksforGeeks
Python Dictionary Find Key By Value - Python Guides
- Question & Answer
Get Keys and Values from a Dictionary in Python - Stack Abuse
Get keys from a dictionary by value in Python | note.nkmk.me
Searches you might like
Access Dictionary Values | Python Tutorial - GeeksforGeeks
Get a value from a dictionary by key in Python | note.nkmk.me
Python - Access Dictionary Items - W3Schools
5 Best Ways to Get a Key From a Value in a Python Dictionary
dictionary - get Key by value, dict, python - Stack Overflow
How To Get the Key By Value In a Dictionary In Python - Stack …
How to Find Key by Value in Python Dictionary | Delft Stack
Python Get Dictionary Value by Key - GeeksforGeeks
Get key by value in dictionary - W3docs
How to access a Dictionary Key by Index in Python | bobbyhadz
Python Dictionary get() - Programiz
Python Dictionary get() Method - W3Schools
Python Dictionary get() Method - GeeksforGeeks
Python Get Dictionary Value By Key - Tutorialdeep
Kamala Harris: What to know about Biden's endorsed successor
Getting a KeyValuePair<> directly from a Dictionary<>
c# - Get dictionary value by key - Stack Overflow
- Some results have been removed