input: Write a function to generate a pattern of numbers where each row consists of consecutive numbers from 1 to the row number. The function should print the pattern row by row. If the input is None, the function should print an empty string.
  assert number_pattern(5) == '1\n12\n123\n1234\n12345\n'
  assert number_pattern(3) == '1\n12\n123\n'
  assert number_pattern(1) == '1\n'
  assert number_pattern(0) == ''
  assert number_pattern(None) == ''
output: def number_pattern(n):
      if n is None:
          return ''
      result = ''
      for i in range(1, n + 1):
          result += ''.join(str(j) for j in range(1, i + 1)) + '\n'
      return result.strip()