input: Write a function to sort a list of strings by their length in non-decreasing order. The function should take a list of strings as input and return a new list with the strings sorted by their length.
  assert sort_by_length(["cat", "dog", "apple", "banana"]) == ["cat", "dog", "apple", "banana"]
  assert sort_by_length(["banana", "apple", "pear", "kiwi"]) == ["pear", "kiwi", "apple", "banana"]
  assert sort_by_length(["a", "bb", "ccc", "dddd"]) == ["a", "bb", "ccc", "dddd"]
  assert sort_by_length([]) == []
  assert sort_by_length(["", "a", "aa", "aaa"]) == ["", "a", "aa", "aaa"]
output: def sort_by_length(strings):
      return sorted(strings, key=len)