li = ['alex', 'egon', 'smith', 'pizza', 'alen']
print(list(sorted(li,key=lambda x:x[1])))

特点,价格匿名函数作为key

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-28
  • 2022-01-01
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
  • 2021-11-23
猜你喜欢
  • 2021-11-16
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2021-06-09
  • 2021-08-04
相关资源
相似解决方案