input: Write a function to sort a list of strings based on their length. The function should take a list of strings as input and return the sorted list.
  assert sort_by_length(["Hello", "World!", "Good", "Morning"]) == ["Good", "Hello", "Morning", "World!"]
  assert sort_by_length(["Python", "Java", "C", "Rust"]) == ["C", "Rust", "Java", "Python"]
  assert sort_by_length(["a", "aa", "aaa", "aaaa"]) == ["a", "aa", "aaa", "aaaa"]
  assert sort_by_length([]) == []
output: def sort_by_length(strings):
      return sorted(strings, key=len)