input: Write a python function to print a pattern of stars in the given format.
  assert pattern() == None
  # Expected output:
  # *
  # * *
  # * * *
  # * * * *
  # * * * * *
  # * * * * *
  # * * * *
  # * * *
  # * *
  # *
output: def pattern():
      for i in range(1, 6):
          print('* ' * i)
      for i in range(5, 0, -1):
          print('* ' * i)