input: Write a function to generate a numeric pyramid.
  assert numeric_pyramid(3) == ['1  2  3  ', '2  1  ', '1  ']
  assert numeric_pyramid(4) == ['1  2  3  4  ', '2  3  2  1  ', '3  2  1  ', '4  3  2  1  ']
  assert numeric_pyramid(2) == ['1  2  ', '2  1  ']
output: def numeric_pyramid(n):
      result = []
      for i in range(1, n + 1):
          row = []
          if i % 2 == 1:
              for j in range(1, n - i + 2):
                  row.append(str(j) + '  ')
          else:
              for j in range(n - i + 1, 0, -1):
                  row.append(str(j) + '  ')
          result.append(''.join(row))
      return result