question about dictionaries

Chris chrispatton at gmail.com
Fri Jan 20 01:34:39 CET 2006


When you declare a dictionary, Python puts it in a different order than
the way you declare it:

>>> stuff = {'\n':'', '<br>:'\n'}
>>> print stuff
{'<br>':'\n', '\n':''}

Is there a way to stop this behavior? I want to process this dictionary
in the order it's in, element by element. I'm running Python 2.3, if
that helps.   

Thanks for any help!




More information about the Python-list mailing list