1
2
3
4
5
6
from functools import cmp_to_key
def cmp(s1, s2):
return s1<s2

sorted(path_list, key=cmp_to_key(cmp))