Python 3 'print' 语法错误:缺少括号
在 Python 3 中,'print' 语句需要使用括号。例如,'print astr' 应该改为 'print(astr)'。
您提供的错误消息中,需要将 'print astr' 改为 'print(astr)'。修改后的代码如下所示:
print(astr)
通过添加括号,您将确保代码在 Python 3 中正确执行。
原文地址: https://www.cveoy.top/t/topic/fKxM 著作权归作者所有。请勿转载和采集!