> -----Original Message----- > From: John Salerno [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 01, 2007 11:54 AM > To: python-list@python.org > Subject: Re: Sorting a list > > Bruno Desthuilliers wrote: > > John Salerno a écrit : > >> Hi everyone. If I have a list of tuples, and each tuple is in the form: > >> > >> (year, text) as in ('1995', 'This is a citation.') > >> > >> How can I sort the list so that they are in chronological order based > >> on the year? > > > > Calling sort() on the list should just work. > > Amazing, it was that easy. :) Hello, John.
Yeah. That's one of the things that drew me to Python: so many things you want to do are just so *easy* in Python. Regards, Barry [EMAIL PROTECTED] 541-302-1107 ________________________ We who cut mere stones must always be envisioning cathedrals. -Quarry worker's creed -- http://mail.python.org/mailman/listinfo/python-list