input: Write a function to sort a list of strings by their length in ascending order. The function should take a list of strings as its input and return the sorted list. If the list is empty, it should return the empty list.
  assert sort_by_length(["cat", "dog", "apple", "banana"])==["cat", "dog", "apple", "banana"]
  assert sort_by_length(["java", "python", "c"])==["c", "java", "python"]
  assert sort_by_length([""])==[""]
  assert sort_by_length([])==[]
output: def sort_by_length(strings):
      return sorted(strings, key=len)