[portland] Sorting A List of Tuples

Adam Lowry adam at therobots.org
Thu Nov 8 20:51:28 CET 2007

On Nov 8, 2007, at 11:44 AM, Rich Shepard wrote:
>   Yes. Importing itemgetter from operator, and using sorted()  
> followed by
> .reverse() the results are what are needed in the report.

You can do the reverse at the same time, if you'd like:
sorted(key=blahblahblah, reverse=True)

The reverse flag is also available on [].sort().


More information about the Portland mailing list