Discuss / Python / T1

Eye丶杯

#1 Created at ... [Delete] [Delete and Lock User]

def name(L):

    return sorted(L,key = lambda a:a[0])    # 以元组中第一个元素作为sorted排序对象

def score(L):

    return sorted(L,key = lambda a:a[1],reverse = True)      #以元组中第二个元素作为sorted排序对象


  • 1

Reply