input: from typing import List
  
  def sort_by_length(strings: List[str]) -> List[str]:
      """ Sorts list of strings by their length in ascending order.
      >>> sort_by_length(["cat", "dog", "apple", "banana"])
      ["cat", "dog", "apple", "banana"]
      >>> sort_by_length(["python", "java", "c", "ruby"])
      ["c", "java", "ruby", "python"]
      """
      for i in range(len(strings) - 1):
          for j in range(i + 1, len(strings)):
              if len(strings[i]) > len(strings[j]):
                  strings[i], strings[j] = strings[j], strings[i]
      return strings
output:     return sorted(strings, key=len)