input: Write a function to print a pattern of asterisks in a pyramid shape that first increases and then decreases. The function should take an integer parameter n which represents the number of levels in the pyramid.
  
  Input:
  n = 5
  
  Output:
  Pattern should be printed as:
  *
  **
  ***
  ****
  *****
  ****
  ***
  **
  *
  
  assert print_pattern(5)
  # The output will be the pattern described above
output: def print_pattern(n):
      for i in range(1, n + 1):
          print('*' * i)
      for i in range(n - 1, 0, -1):
          print('*' * i)