input: 
  def sort_by_length(strings):
      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
  
  # Test case
  # Input: ["cat", "dog", "apple", "banana"]
  # Output: ["cat", "dog", "apple", "banana"]
  
output:     return strings