Python_sort使用
获取列表排序的索引结果
1 | list1 = [2,1,4,3,5] |
[1, 0, 3, 2, 4]
多条件列表排序
多重文件夹路径排序
1 | path_list = [ |
字典排序
1 | sort_path_dict = sorted(candidate.items, key=lambda x: x[0]) |
1 | list1 = [2,1,4,3,5] |
[1, 0, 3, 2, 4]
多重文件夹路径排序
1 | path_list = [ |
1 | sort_path_dict = sorted(candidate.items, key=lambda x: x[0]) |