DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
find the max value in dictionary python
my_dict = {'a': 5, 'b': 10, 'c': 6, 'd': 12, 'e': 7} max(my_dict, key=my_dict.get) # returns 'd'
Source by datagy.io #
PREVIOUS
NEXT
Tagged:
#find
#max
#dictionary
#python
ADD COMMENT
Topic
COMMENT
Name
2+9 =
Submit