[Tutor] Question about order in a dictionary
Dick Moores
rdmoores at gmail.com
Mon Jun 28 02:50:29 EDT 2004
Python 2.3.4
In IDLE, if I enter
D = {"a": "first letter", "b": "second letter", "c": "third letter",
"z": "last letter"}
and then
print D
I get
{'a': 'first letter', 'c': 'third letter', 'b': 'second letter', 'z':
'last letter'}
Why does the order change? I'm just beginning to understand
dictionaries, and I suppose the order doesn't matter, but why would it
change?
Thanks,
Dick Moores
More information about the Tutor
mailing list