Sorting a list
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Thu Feb 1 16:54:40 EST 2007
Steven Bethard a écrit :
> Bruno Desthuilliers wrote:
>
>> If you want to prevent this from happening and don't mind creating a
>> copy of the list, you can use the sorted() function with the key and
>> reverse arguments and operator.itemgetter:
>>
(snip)
>
> You don't need to use sorted() -- sort() also takes the key= and
> reverse= arguments::
>
Yeps - thanks for the reminder.
More information about the Python-list
mailing list