sorting a dictionary

Greg Ewing (using news.cis.dfn.de) me at privacy.net
Thu Feb 20 22:44:56 EST 2003


user at domain.invalid wrote:
> How about creating a sorted dictionary then? That is, add elements
> to the dictionary in the order they are supposed to be in.
> Is that not possible?

It won't make any difference. Python dictionaries don't
keep any information about what order the items were
added.

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg





More information about the Python-list mailing list