subeen: > I think you should go for 'dictionary' that is a built-in data > structure of Python.
The OP asks this too: > maintain the order (for iter and print) So I think an "ordered dict" is fitter, the op can search for an odict implementation, in the cookbook too (I too have written one, but it's useful only if you have to delete keys often, because it's O(1) for that operation too, but generally slow if you don't need to delete keys too). Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list