Sorting Python list based on the length of the string,xs.sort(key=lambda s: len(s))