在python中,错误“index error:tuple index out of range”是什么意思?

2024-05-15 01:17:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图清理我的代码,而不是使用一堆if语句来处理函数。这是我的代码:

def tic(inpinp, board, qweqwe):
    global lik 
    ink = inpinp - 1
    lik = board.insert(ink, qweqwe)


lis = ['  ', '  ', '  ', '  ', '  ', '  ',  '  ', '  ']

p = input("Player 1, would you like to be X or O?")
inpu = int(input("Where would you like to go?"))






print('{}|{}|{}'.format())
print('--|--|--'.format())
print('{}|{}|{}'.format())
print("--|--|--".format())
print('{}|{}|{}'.format())

Tags: to代码boardyouformatinputif语句

热门问题