input: Write a function to generate a 7x7 grid where each element is either a '#' or a space character, determined by whether the sum of the row and column indices is even or odd. 
      def generate_grid():
          for i in range(7):
              for j in range(7):
                  if (i + j) % 2 == 0:
                      print('#', end='')
                  else:
                      print(' ', end='')
              print()
  
  assert generate_grid()==None
output: def generate_grid():
      grid = []
      for i in range(7):
          row = []
          for j in range(7):
              if (i + j) % 2 == 0:
                  row.append('#')
              else:
                  row.append(' ')
          grid.append(row)
      return grid