How do I count the highest key in a python dictionary? (very pythonic way?) EDIT: make a list

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2010-05-19T21:33:38Z Indexed on 2010/05/19 22:00 UTC
Read the original article Hit count: 162

Filed under:
|

d = {'apple':9,'oranges':3,'grapes':22}

How do I return the largest key/value?

Edit: How do I make a list that has this sorted by largest to lowest value?

© Stack Overflow or respective owner

Related posts about python

Related posts about dictionary