Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

find the highest 3 values in a dictionary.

>>> sorted(my_dict, key=my_dict.get, reverse=True)[:3]
['K', 'B', 'A']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #find #highest #values
ADD COMMENT
Topic
Name
6+8 =