Dictionary keys have no defined order.  This is what the docs say about that:

Keys and values are listed in random order. If items(), keys(),
values(), iteritems(), iterkeys(), and itervalues() are called with no
intervening modifications to the dictionary, the lists will directly
correspond.

jw

On Apr 10, 2005 4:57 PM, Joshua Ginsberg <[EMAIL PROTECTED]> wrote:
>  >>> {'a':1,'b':'2','c':[3,4]}.keys()
> ['a', 'c', 'b']
> 
> How come? :-)
> 
> -jag
> 
> Python 2.3.3 (#1, May  7 2004, 10:31:40)
> [GCC 3.3.3 20040412 (Red Hat Linux 3.3.3-7)] on linux2
> 
> 
> 
> Joshua Ginsberg -- [EMAIL PROTECTED]
> Brainstorm Internet Network Operations
> 970-247-1442 x131
> 
> --
> http://mail.python.org/mailman/listinfo/python-list
> 
> 
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to