Re: sort dictionary by specific values

2007-08-18 Thread Arnau Sanchez
dorje tarap escribió: >2. > {8: (99, 99), 9: [(55, 67), (77, 66), (67, 88)], 4: [(45, 78), > (56, 78), (99, 78)], 5: (67, 77)} > > > I want to sort the entire dictionary based on the last values in each > line. First for [-1][0] and then[-1][0] Each "line" means each value in t

Re: sort dictionary by specific values

2007-08-18 Thread Gary Herron
dorje tarap wrote: > Hi, > > I need to perform some horrible functions in python I need to do, > using sort in a similar way that Excel can. > > With a dictionary like: > Code: ( text ) > > 1. > >>> d > 2. > {8: (99, 99), 9: [(55, 67), (77, 66), (67, 88)], 4: [(45, 78), > (56,