sorted(main, key lambda x:x[1] code example Example: sorted lambda sorted(student_tuples, key=lambda student: student[2])