On Tue, May 13, 2008 at 7:32 AM, Mugund K <k.mugund at yahoo.com> wrote: > > A quick but ugly [brain-dead :-) ]fix would be sorting keys seperately, > >>> temp = d.keys() > >>> temp.sort() > >>> for i in temp: Not so ugly; before sorted() was introduced (Python 2.4) that would be the way to do it. Kent