参考链接:http://python.jobbole.com/85488/
对python 中有元组 元组中有时间字段,需要根据时间字段来排序,
student_tuples = [
('john', 'A', 15),
('jane', 'B', 12),
('dave', 'B', 10),
]
>>> sorted(student_tuples, key=lambda student: student[2]) # sort by age
[('dave', 'B', 10), ('jane', 'B', 12), ('john', 'A', 15)]
print(sorted(record_list,key=lambda student: student[1]))
可以采用这种方式