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!