python sorted list 包含元组 字典 的多列排序

#包含字典dict的列表list的排序方法与dict的排序相似,以下: import operator x = [{'name':'homer', 'age':39}, {'name':'bart', 'age':10}, {'name':'aart', 'age':20}, {'name':'aart', 'age':10}] print x sorted_x = sorted(x, key=l
相关文章
相关标签/搜索