Python字典列表排序import operator x = [{'age': 10, 'name': 'Bart'}, {'age': 39, 'name': 'Homer'}] sorted_x = sorted(x, key=operator.itemgetter('name'), reverse=True) print sorted_x 2014-07-17 python+ 阅读全文