input: Write a function to sort a list of strings by their length.
  assert sort_by_length(["apple", "banana", "kiwi", "plum"]) == ["kiwi", "plum", "apple", "banana"]
  assert sort_by_length(["cat", "elephant", "dog", "hippopotamus"]) == ["cat", "dog", "elephant", "hippopotamus"]
  assert sort_by_length(["abcd", "a", "abc", "ab", "abcd"]) == ["a", "ab", "abc", "abcd", "abcd"]
output: def sort_by_length(strings):
      return sorted(strings, key=len)