Not sure how to work the code


makes a very wonky output and spits back the error message "does not have five rows"

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


Start by defining board as an empty list.

board = []

Now you loop will append the correct number of rows. Move the print statement outside of the loop.


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