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.
  assert sort_by_length(["Hello","World!","Good","Morning"])==["Good","Hello","World!","Morning"]
  assert sort_by_length(["Python","Java","C++","Go"])==["Go","C++","Java","Python"]
  assert sort_by_length(["a","bb","ccc","dddd"])==["a","bb","ccc","dddd"]
  assert sort_by_length(["","short","verylong","medium"])==["","short","medium","verylong"]
  assert sort_by_length([])==[]
output: def sort_by_length(strings):
      return sorted(strings, key=len)