sorting a dictionary
Yuval
yuvalfeld at hotmail.com
Tue Feb 4 01:56:20 EST 2003
More information about the Python-list mailing list
Tue Feb 4 01:56:20 EST 2003
- Previous message (by thread): sorting a dictionary
- Next message (by thread): sorting a dictionary
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Previous message (by thread): sorting a dictionary
- Next message (by thread): sorting a dictionary
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list