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. If the input list is empty, the function should return an empty list.
  
  assert sort_by_length(["Hello","World!","Good","Morning"]) == ["Good","Hello","World!","Morning"]
  assert sort_by_length(["a","bb","ccc","dddd"]) == ["a","bb","ccc","dddd"]
  assert sort_by_length(["python","java","c"]) == ["c","java","python"]
  assert sort_by_length([]) == []
output: def sort_by_length(strings):
      return sorted(strings, key=len)