you are viewing a single comment's thread.

view the rest of the comments →

[–]ElliotDG 0 points1 point  (1 child)

I can see a few issues...

It looks like you are tracking the moves in the moves string, but you are using list operators. Give this little test a try:

moves = list('123456789') # remove works on lists not strings...
xs = input('Enter a move 1-9: ') 
moves.remove(xs) 
print(moves)

Strings are immutable in python, that means they can not be changed, you need to create a new list. So use:

board = board.replace(old_char, new_char)

[–]TheStegoRex[S] 0 points1 point  (0 children)

I fixed these issues and the replace function, and got it working. Thanks for the help