python列表排序逆序sorted reverse=True

>>> names = ["john", "hack", "blank"]
>>> abc = sorted(names)
>>> abc
['blank', 'hack', 'john']
>>> abcd = sorted(names, reverse=True)
>>> abcd
['john', 'hack', 'blank']

默认是reverse=False 升序

原文地址:https://www.cnblogs.com/v5captain/p/14038415.html