Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get min max value from a dictionary

d = {'A': 4,'B':10}
min_v = min(zip(d.values(), d.keys()))
# min_v is (4,'A')

max_v = max(zip(d.values(), d.keys()))
# max_v is (10,'B')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #min #max #dictionary
ADD COMMENT
Topic
Name
6+7 =