dictionary issue (and maybe PEP ... depending on the answer)

dsavitsk dsavitsk at ecpsoftware.com
Mon Jun 2 02:09:29 EDT 2003


Dave Harrison wrote:
> My quick - ignorant - question is :
> 
> Why dont we get :
> 
> 1, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9
> 
At the very least because they are integers, so if sorted, they should 
be sorted correctly.
'1', '11', '12', '2', '3', '4', '5', '6', '7', '8', '9'
might make sense, however, if the keys were strings.

-doug





More information about the Python-list mailing list