input: Write a python function to sort a list of strings by their length.
  assert sort_by_length(["Code", "Python", "JavaScript", "Java"]) == ["Code", "Java", "Python", "JavaScript"]
  assert sort_by_length(["a", "abcde", "abcd", "ab", "abc"]) == ["a", "ab", "abc", "abcd", "abcde"]
  assert sort_by_length(["short", "longer", "tiny", "lengthy"]) == ["tiny", "short", "longer", "lengthy"]
output: def sort_by_length(lst):
      return sorted(lst, key=len)