❶ python实现字符串行表排序
a = ['b', 'a', 'c', 'ab', 'aa', 'aaa']a.sort(key=lambda x: str(len(x)) + x)print(a)#['a', 'b', 'c', 'aa', 'ab', 'aaa']