vgrabovets
5/5/2017 - 12:37 PM

sort dictionary

sort dictionary

sorted(dictionary, key=dictionary.get, reverse=True)

[(i, dictionary[i]) for i in sorted(dictionary, key=dictionary.get, reverse=True)]