input: Write a function to generate a chessboard pattern using '#' and spaces where a '#' is printed if the sum of the row and column indices is even, otherwise a space is printed. The chessboard should be 7x7 in size.
  assert generate_chessboard()=='''#######
   #######
  #######
   #######
  #######
   #######
  #######
  '''
output: def generate_chessboard():
      board = []
      for i in range(7):
          row = ''
          for j in range(7):
              if (i + j) % 2 == 0:
                  row += '#'
              else:
                  row += ' '
          board.append(row)
      return '\n'.join(board)