这是我的代码:
Board=['0','0','0','0','0','0','0','0','0']
def printBoard():
print Board[0:3]
print Board[3:6]
print Board[6:9]
printBoard()
def playerMove():
counter=0
for i in range(9):
move=int(raw_input('What spot would you like to move? 0-8'))
counter+=1
if(counter%2==1):
Board[move]='x'
else:
Board[move]='o'
playerMove()
我是python的新手,所以请不要更改我的代码以使其更好或更有效,只需告诉我需要做什么来将输入的值更改为整数。谢谢!