python 列表中的字典按某个字段排序

health = sorted(healths, key=lambda k: k['sort'])# healths列表名,sort是字段名

猜你喜欢

转载自www.cnblogs.com/meili970202/p/13392380.html