[Tutor] dictionary

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Mon Oct 24 19:16:05 CEST 2005


> > I typed:
> > landUse = {'res': 1, 'com': 2, 'ind': 3, "other" :[4,5,6,7]}
> > and when i checked landUse, I found it become:
> > {'ind': 3, 'res': 1, 'other': [4, 5, 6, 7], 'com': 2}
> > why the order is changed?
>
> the docs warn you about this.


Hi Shi,

By the way, here's a post from a long long time ago that might help make
it clearer what dictionaries are doing:

    http://mail.python.org/pipermail/tutor/2002-January/011281.html



More information about the Tutor mailing list