On Wed, Nov 12, 2003 at 10:41:36PM -0500, John P Speno wrote: > def my_sort(a, b): > return cmp(a[0], b[0]) > > l.sort(my_sort) I forgot that by default, python's list sort method will sort a list of sequences based on the first item in the sequence, so you can get rid of the my_sort function, and just call l.sort().