Ordered dictionary?

Josiah Carlson jcarlson at nospam.uci.edu
Thu Jan 22 15:27:39 EST 2004


Leif K-Brooks wrote:
> I need to associate a string (key) with an integer (value). A dictionary 
> would do the job, except for the fact that it must be ordered. I also 
> need to look up the value for a specific key easily, so a list of tuples 
> wouldn't work.

How must the dictionary be ordered?  Do you need the keys or the values 
sorted?

  - Josiah



More information about the Python-list mailing list