sorting a dictionary

Yuval yuvalfeld at hotmail.com
Tue Feb 4 01:56:20 EST 2003


I'm looking for an efficient way to get the key of the highest value
in a dictionary.
For example, for dict = {"a":10, "b":5, "c":15}, I want to write a
function get_highest(dict), that will return c as the result (since c
is the key of the highest value in the dict.

Thanks.




More information about the Python-list mailing list