Q:

Creating a chess board for the 8 Queens puzzle

s = [0,2,6,4,7,1,5,3]

def row_top():
    print("|--|--|--|--|--|--|--|--|")

def cell_left():
   print("| ", end = "")

def solution(s):
   for i in range(8):
       row(s[i])

def cell_data(isQ):
   if isQ:
      print("X", end = "")
      return ()
   else:
      print(" ", end = "")

def row_data(c):
   for i in range(9):
      cell_left()
      cell_data(i == c)

def row(c):
   row_top()
   row_data(c)
   print("\n")

solution(s)

My output has a space every two lines, when there shouldn't be, I'm not sure where it's creating that extra line.
The output is suppose to look like this:
|--|--|--|--|--|--|--|--|
|  |  |  |  |  | X|  |  |
|--|--|--|--|--|--|--|--|
|  |  | X|  |  |  |  |  |
|--|--|--|--|--|--|--|--|
|  |  |  |  | X|  |  |  | 
|--|--|--|--|--|--|--|--|
|  |  |  |  |  |  |  | X|
|--|--|--|--|--|--|--|--|
| X|  |  |  |  |  |  |  |
|--|--|--|--|--|--|--|--|
|  |  |  | X|  |  |  |  |
|--|--|--|--|--|--|--|--|
|  | X|  |  |  |  |  |  |
|--|--|--|--|--|--|--|--|
|  |  |  |  |  |  | X|  |
|--|--|--|--|--|--|--|--|

I know this chess board isn't very square but this is only a rough draft at the moment.

A:

You are still printing an extra newline:
def row(c):
   row_top()
   row_data(c)
   print("\n")

Remove the explicit ''\n'` character:
def row(c):
    row_top()
    row_data(c)
    print()

or better still, follow my previous answer more closely and print a closing | bar:
def row(c):
    row_top()
    row_data(c)
    print('|')

