我创建了tictactoe类的对象,然后在其上调用显示方法:我收到错误消息,提示未定义List_1Blockquote
Traceback (most recent call last):
File "<pyshell#8>", line 1, in <module>
a.display()
File "C:/Users/Kunall/Documents/#1 Code/#Projects/tic_tac_toe_0.2.py", line 6, in display
for l in list_1:
NameError: name 'list_1' is not defined
Blockquote
list_1
,您应该使用self.list_1
,同样使用self.uc_list