input: 
  def print_pattern():
      """
      Prints a 7x7 grid where '#' appears in positions where the sum of the row and column indices is even,
      and ' ' appears where the sum is odd.
      >>> print_pattern()
      # # # # # # #
        # # # # # #
      # # # # # # #
        # # # # # #
      # # # # # # #
        # # # # # #
      # # # # # # #
      """
      for i in range(7):
          for j in range(7):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()
  
output:     for i in range(7):
          for j in range(7):
              if (i + j) % 2 == 0:
                  print('#', end='')
              else:
                  print(' ', end='')
          print()