Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sort dict by value

for w in sorted(d, key=d.get, reverse=True):
    print(w, d[w])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sort #dict
ADD COMMENT
Topic
Name
5+7 =