On 1 March 2017 at 19:38, Serhiy Storchaka <storch...@gmail.com> wrote:
> On 01.03.17 11:31, Paul Moore wrote:
>>
>> On 1 March 2017 at 01:31, qhlonline <qhlonl...@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).

Indeed. Which illustrates nicely why learning Python's approach to
doing things rather than translating idioms from other languages will
get cleaner code.
Paul
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to