How to sort Python list by multiple attributes, one in ascending order, one in descending order?

后端 未结 0 1243
北恋
北恋 2020-12-08 06:53

I want to sort the following list of tuples by name in ascending order and age in descending order. The list is below, and the values are (id, name, and age). I can do it by

相关标签:
回答
  • 消灭零回复
提交回复
热议问题