python3.7 sorted 自定义排序
from functools import cmp_to_key
ls=['9','23','3','56','78']
sorted(ls, key=cmp_to_key(lambda x, y: int(x + y) -int(y + x)))
from functools import cmp_to_key
ls=['9','23','3','56','78']
sorted(ls, key=cmp_to_key(lambda x, y: int(x + y) -int(y + x)))