Regarding Dictionaries in python

Mehta, Anish Anish.Mehta at enst-bretagne.fr
Mon Apr 21 16:34:35 EDT 2003


Hello !

I am having a small query regarding dictionaries in python. From 
Orelly's Programming Python

 >>>D= {'a' : 1, 'b' : 2, 'c' : 3, 'd' : 4}
 >>>D.items()
[ ('b', 2), ('c', 3), ('d', 4), ('a', 1)]


why it is not showing the items in order in which i have inserted. 
Please tell me why it is happing like this.

Thanks in advance.

Regards...








More information about the Python-list mailing list