so i’ve had multiple problems with a tic tac toe game i’m making, but i’ve found solutions to most of the problems. but the problem now is that i get an error reading
Traceback (most recent call last):
File "/Users/user/Desktop/tic tac toe game.py", line 43, in <module>
if board[input] != 'x' and board[input] !='o':
TypeError: list indices must be integers, not builtin_function_or_method"
when i try and run it. and here’s the code it’s having issues with:
if board[input] != 'x' and board[input] !='o':
board[input] = 'x'
i’m not sure what to do and i like just started python on thursday and am not very smart with it.. but thanks for all the help (: oh and i have python 3.2.
looks like
inputis not an integer here, you’ve usedinput()here, which is a built-in function.Don’t ever use
inputas a variable name too.see same error:
to work around it, use: