📜  基于多个键的python排序 - Python代码示例

📅  最后修改于: 2022-03-11 14:47:09.543000             🧑  作者: Mango

代码示例2
>>> def multisort(xs, specs):
...     for key, reverse in reversed(specs):
...         xs.sort(key=attrgetter(key), reverse=reverse)
...     return xs