input: Write a function to sort a list of strings based on their length. If the input list is empty, return the empty list as is.
  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(["Python","is","great"])==["is","great","Python"]
  assert sort_by_length([])==[]
output: def sort_by_length(words):
      words.sort(key=len)
      return words