热线电话:13121318867

登录
2020-10-25 阅读量: 1040
python出现SyntaxError: Missingparentheses in call to 'print'错误原因是什么?

在错误的第一行,有这么一行文字:

Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:16:31) [MSC v.1600 64 bit (AMD64)]on win32

这表示的是 Python 的解释器的版本,在 Python 2.x 版本中 print 是作为关键字出现的,而在Python 3.x 版本中,print是作为函数出现。

以上内容不理解没关系,只要记得在 python 2.x 中使用形如 print “hello”

在 python 3.x 中使用形如 print(“hello”)


0.0783
0
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子