Regarding Dictionaries in python

John Hall wweexxsseessssaa at
Tue Apr 22 00:36:37 CEST 2003

On Mon, 21 Apr 2003 22:34:35 +0200, "Mehta, Anish"
<Anish.Mehta at> wrote:

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

Because the order of items in dictionaries is inherently undefined, or
whimsical if you prefer. Your book should tell you that, but of course
you need to read the relevant sentence.

There are cookbook recipes for sorting them if you really need to.

John W Hall <wweexxsseessssaa at>
Calgary, Alberta, Canada.
"Helping People Prosper in the Information Age"

More information about the Python-list mailing list