'''
L = [('Bob', 75), ('Adam', 92), ('Bart', 66), ('Lisa', 88)]
def func(L):
for x in L:
if not isinstance(x,str):
return x
L = sorted(L,key =func)
print(L)
'''
'''
L = [('Bob', 75), ('Adam', 92), ('Bart', 66), ('Lisa', 88)]
def func(L):
return L[0]
L = sorted(L,key = func)
print(L)
'''
you_you_k
为什么第一种写法,输出是从小到大排 第二个是从大到小排