Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python find the key with max value

a_dictionary = {"a": 1, "b": 2, "c": 3}

# get key with max value
max_key = max(a_dictionary, key=a_dictionary.get)

print(max_key)
Source by kite.com #
 
PREVIOUS NEXT
Tagged: #python #find #key #max
ADD COMMENT
Topic
Name
2+5 =