input: Write a function to print a diamond pattern of asterisks for a given number of rows.
  assert print_diamond(3) == "* \n* * \n* * * \n* * \n* \n"
  assert print_diamond(4) == "* \n* * \n* * * \n* * * * \n* * * \n* * \n* \n"
  assert print_diamond(2) == "* \n* * \n* \n"
output: def print_diamond(rows):
      diamond = []
      for i in range(1, rows + 1):
          diamond.append('* ' * i)
      for i in range(rows - 1, 0, -1):
          diamond.append('* ' * i)
      return '\n'.join(diamond) + '\n'