📅  最后修改于: 2022-03-11 14:45:46.402000             🧑  作者: Mango
strs = ['ccc', 'aaaa', 'd', 'bb'] print sorted(strs, key=len) ## ['d', 'bb', 'ccc', 'aaaa']
#the list will be sorted by the length of each argument