input: Write a python function to sort a list of strings according to their lengths.
  assert sortByLength(["apple", "pear", "banana", "kiwi"]) == ["kiwi", "pear", "apple", "banana"]
  assert sortByLength(["Python", "is", "a", "programming", "language"]) == ["a", "is", "Python", "language", "programming"]
  assert sortByLength(["one", "two", "three", "four"]) == ["one", "two", "four", "three"]
output: def sortByLength(strings):
      return sorted(strings, key=len)