Traceback (most recent call last):
File "python", line 12, in
File "python", line 9, in print_board
TypeError: 'int' object is not iterable
I just want to try using the "for a in len(x), print board[a]" as following, printing the index of the list, instead of using just print the item. But, as you see, I fail.
I just wander why. What is the problem with my code?
board =  for i in range(5): board.append(["O"] * 5) def print_board (x): for a in len(x): print board[a] print_board(board)