如何按列表的元素中的第二个元素排序
摘要:li = ['alex', 'egon', 'smith', 'pizza', 'alen'] print(list(sorted(li,key=lambda x:x[1]))) 特点,价格匿名函数作为key
阅读全文
posted @ 2020-01-11 23:54
posted @ 2020-01-11 23:54
posted @ 2020-01-11 19:48