Is numeric keys of Python's dictionary automatically sorted?

Robert Kern robert.kern at gmail.com
Wed Mar 7 22:17:03 CET 2007


John wrote:
> Then is there anyway to sort the numeric keys and avoid future implemetation 
> confusion?

sorted(mydict.keys())

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
 that is made terrible by our own mad attempt to interpret it as though it had
 an underlying truth."
  -- Umberto Eco




More information about the Python-list mailing list