input: Write a python function to print a pattern of numbers.
  assert print_pattern(3) == "1\n12\n123\n"
  assert print_pattern(5) == "1\n12\n123\n1234\n12345\n"
  assert print_pattern(1) == "1\n"
output: def print_pattern(n):
      result = ""
      for i in range(1, n + 1):
          for j in range(1, i + 1):
              result += str(j)
          result += "\n"
      return result