[Python-ideas] suggestion about the sort() function of the list instance

Serhiy Storchaka storchaka at gmail.com
Wed Mar 1 14:38:24 EST 2017


On 01.03.17 11:31, Paul Moore wrote:
> On 1 March 2017 at 01:31, qhlonline <qhlonline at 163.com> wrote:
>> My code example is not proper,  Yes,  may be this is better:
>> list.sort().revers(
>
> We can already do this - reversed(sorted(lst))

Or just sorted(lst, reverse=True).




More information about the Python-ideas mailing list