Список заказов Python по нескольким индексу

sorted_list = sorted(a_list, key = lambda x: (x[1], x[0]))
Old-fashioned Ostrich