li = ['alex', 'egon', 'smith', 'pizza', 'alen'] print(list(sorted(li,key=lambda x:x[1])))
特点,价格匿名函数作为key