学习笔记(12):Python 面试100讲(基于Python3.x)-用lambda表达式对列表进行排序

立即学习:https://edu.csdn.net/course/play/26755/340130?utm_source=blogtoedu

列表中字典排序:按照年龄大小

sorted(a,key=lambda x:x["age"]))

发布了26 篇原创文章 · 获赞 2 · 访问量 285

猜你喜欢

转载自blog.csdn.net/qq_35504363/article/details/104252957