Sort dictionary data
Neil Schemenauer
nas at python.ca
Mon May 20 14:40:52 EDT 2002
You can't sort a dictionary. You probably want something like:
d = { 'b': 1, 'a': 2}
items = d.items()
items.sort()
HTH,
Neil
More information about the Python-list
mailing list