题解 | #成绩排序#
成绩排序
http://www.nowcoder.com/practice/8e400fd9905747e4acc2aeed7240978b
num = int(input()) isreverse = int(input()) student = [] for i in range(num): student.append(input()) sorted_student = sorted(student,key=lambda x:int(x.split(' ')[1]),reverse=1-isreverse) for i in sorted_student: print(i)