input: Write a python function to print a pattern of increasing and then decreasing stars for a given number of lines.
  assert print_pattern(5) == "*
  **
  ***
  ****
  *****
  *****
  ****
  ***
  **
  *"
output: def print_pattern(n):
      pattern = []
      for i in range(1, n + 1):
          pattern.append('*' * i)
      for i in range(n, 0, -1):
          pattern.append('*' * i)
      return '\n'.join(pattern)