Printing Pretty


#1



https://www.codecademy.com/en/courses/python-beginner-en-4XuFm/0/6?curriculum_id=4f89dab3d788890003000096#

;Can anyone help me? I can't figure out what's wrong with my code.
This was the error message:


Traceback (most recent call last):
File "python", line 8, in
File "python", line 7, in print_board
TypeError: sequence item 0: expected string, list found


board=[]
for i in range(0,5):
    board.append(["O"]*5)

def print_board(board):
    for item in board:
        print " ".join(board)
print_board(board)


#2

Hello

In line 8 the instructions want you to append a row , not a board.
Also in line 7 the instructions want a row, not an item in the board.

I hope that helps.
Let me know.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.