python按照字符串长度排序_根据字符串的长度对Python列表进行排序
I want to sort a list of strings based on the string length. I tried to use sort as follows, but it doesn't seem to give me correct result.xs = ['dddd','a','bb','ccc']print xsxs.sort(lambda x,y: len(x...