如何解决在python中分配变量的语法错误
我开始在井字游戏中创建这个新的python项目,但是当我尝试运行它时,ArrayBlockingQueue
中的“ =”出现错误
winScreen = Tk()
我花了大约半个小时的时间来尝试编辑,理解和解决该问题,但尚未找到解决方案。
P.S。请不要完成我的项目,我想自己完成这个项目。
解决方法
最长的一行出现错误:您没有关闭方括号。
在屏幕截图中(为清楚起见,在每个OR
之后包裹),我突出显示了错误。
因此,最长的一行应该是:
if square[0][0] == square[1][0] and square[1][0] == square[2][0] or square[0][1] == square[1][1] and square[1][1] == square[2][1] or square[0][2] == square[1][2] and square[1][2] == square[2][2] or square[0][0] == square[0][1] and square[0][1] == square[0][2] or square[1][0] == square[1][1] and square[1][1] == square[1][2] or square[2][0] == square[2][1] and square[2][1] == square[2][2] or square[0][0] == square[1][1] and square[1][1] == square[2][2] or square[2][0] == square[1][1] and square[1][1] == square[0][2]:
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。