Код: Выделить всё
list = [
{'name': 'JOHN', 'points': 30, 'time': '0:02:02'},
{'name': 'MATT', 'points': 30, 'time': '0:02:00'},
{'name': 'KARL', 'points': 50, 'time': '0:03:00'}
]
Я пробую это:
Код: Выделить всё
import operator
list.sort(key=operator.itemgetter('points', 'time'))
Подробнее здесь: https://stackoverflow.com/questions/594 ... -then-by-y
Мобильная версия