input: Write a function to take a list of strings as input and sort them based on their length. The function should return the sorted list of strings.
  def sort_by_length(words):
      words.sort(key=len)
      return words
  
  assert sort_by_length(["Hello","World!","Good","Morning"])==["Good","Hello","World!", "Morning"]
  assert sort_by_length(["apple", "banana", "cherry"])==["apple", "cherry", "banana"]
  assert sort_by_length([])==[]
  assert sort_by_length(["a", "bb", "ccc", "dddd"])==["a", "bb", "ccc", "dddd"]
output: def sort_by_length(words):
      words.sort(key=len)
      return words