2022-02-16

python如何对一个dict list 根据field 排序

    list= sorted(list, key=lambda i: (i['role']))  # 根据属性role排序

你可能感兴趣的:(2022-02-16)