About 8,360,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
- Question & Answer
How to get the key from value in a dictionary in Python?
Get Keys and Values from a Dictionary in Python - Stack Abuse
Get keys from a dictionary by value in Python | note.nkmk.me
- People also ask
Python Dictionary Find Key By Value - Python Guides
How To Get the Key By Value In a Dictionary In Python - Stack …
How to Extract Key from Python Dictionary using Value
Get a value from a dictionary by key in Python | note.nkmk.me
How to Find Key by Value in Python Dictionary | Delft Stack
Python Dictionary get() - Programiz
Access Dictionary Values | Python Tutorial - GeeksforGeeks
Python Get Dictionary Value by Key - GeeksforGeeks
Dictionaries in Python – Real Python
Key-Value Examples for Python Dictionaries: Get, Convert, …
Get Key from Value Python - Letstacle
Python: Check if a Key (or Value) Exists in a Dictionary (5
Python Dictionary (With Examples) - Programiz
How to access a Dictionary Key by Index in Python | bobbyhadz
How To Get Dictionary Value By Key Using Python - Tutorialdeep
Finding key from value in Python dictionary: - Stack Overflow
How to Read XML Files into Python | LearnPython.com
Choosing an AWS database service
python - Get value using key - Stack Overflow
Get Started With YAML | Contabo Blog
python - How to Split a string with Key-value pair - Stack Overflow
- Some results have been removed