a=2 True and a+=3 File stdin line 1 True and a+=3 ^ SyntaxError operator is an illegal expression for augmented assignment发生什么了
发生了语法错误。在Python中,逻辑运算符(如and)左右两侧必须是布尔值,而不是可执行语句。因此,无法将a的值增加3并将其与True进行逻辑运算。
原文地址: https://www.cveoy.top/t/topic/bozX 著作权归作者所有。请勿转载和采集!