Make a list


#1



My wrong message says that "It looks like the rows are not represented as lists."
I can't get it!!! I think I finish the process.


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


#2

If it looks correct to you, consider that you are printing five times.

The board should have this structure:

[['O', 'O', 'O', 'O', 'O'],
 ['O', 'O', 'O', 'O', 'O'],
 ['O', 'O', 'O', 'O', 'O'],
 ['O', 'O', 'O', 'O', 'O'],
 ['O', 'O', 'O', 'O', 'O']]

#3

oh!!!!!
I think I got it!!!!
Thanks a lot~


#4

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