6. Printing pretty



The goal of the exercises is to make the rows as "O O O O O" which my code does but it still says its not the right response.
Where am i going wrong? Thank you! :slight_smile:

board = []
for i in range(5):

def print_board(board):
    for i in board:
        print '"'+" ".join(i)+'"'



Invalid assignment. We cannot assign a statement to a variable. board.append(x) is a statement.

The yield of join is always a string so we do not need to provide a quote wrapper. I bet you are relieved to learn that?

print ' '.join(i)


oh, so i should leave the statement on its own then?
about the quotes, i did that because without them, it was just printing a series of Os and i was getting an error. so, i thought that it was because it was missing quotes.
Thank you!


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