On 16/06/13 11:53, Dave Angel wrote:
On 06/15/2013 08:36 PM, Steven D'Aprano wrote:
for key in sorted(mydict.keys()): ... works fine.
[...]
The sort() method doesn't work, but sorted does.
[...]
for key in sorted(mydict.keys()):
Not only that, but sorted works too: for key in sorted(mydict.keys()) *wink* -- Steven _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor