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(["a", "bb", "ccc", "dddd"])==["a", "bb", "ccc", "dddd"]
  assert sort_by_length([])==[]
output: def sort_by_length(strings):
      return sorted(strings, key=len)