Python自定义排序 123456from functools import cmp_to_keydef cmp(s1, s2): return s1<s2sorted(path_list, key=cmp_to_key(cmp)) 2020/04