5. Custom Print


#1



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


Oops, try again. It looks like you function didn't print out the correct response!


The board prints and looks correct, but I still get an error message.


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

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


#2

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

def print_board(board):
    for row in board:
        print row
        
print_board(board)

That's what I did.
BTW, the difference is that you put " ".join row when I just put print row


#3

Thank you. I was a step ahead I guess. You change to the join command in the next step!


#4

Don't forget to mark my post as the solution...not to be greedy or anything.


#5

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