Make a list


the code apparently works fine but the console displays : "Traceback (most recent call last):
File "python", line 4, in

board = ["O", "O", "O", "O", "O"]

for number in board:


I think len(board) is not always equal to 5,because you will add items to it


for i in range(0,5):
print board

1.I think the data in board[] is stored step by step not settled at first
2.the variable "number" in your program is useless, not help in a loop at all


okay you were right , the data in board is empty at first, thanks guys


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