Sorting a List of Lists

Paul Rubin http
Tue Jan 30 19:38:42 EST 2007


Létezo <letezo at fw.hu> writes:
> > I then thought I'd just go events.sort(lambda x,y: x[2]<y[2]) and call

Use: 
    events.sort(lambda x,y: cmp(x[2], y[2]))
or:
    events.sort(key=lambda x: x[2])



More information about the Python-list mailing list