> but I can not create Newdict to be sorted properly. > > Where do I make a mistake?
By assuming that dictionaries *can* be sorted. For more reading: http://aspn.activestate.com/ASPN/Python/Cookbook/Recipe/52306 http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747 They're intrinsically an unsorted datatype. -tkc -- http://mail.python.org/mailman/listinfo/python-list