运维网's Archiver
论坛
›
Shell/Powershell
› 在Python Shell中输入print 'hello'总是报语法错误
5ol.cc
发表于 2018-8-25 07:32:07
在Python Shell中输入print 'hello'总是报语法错误
在Python3.1的shell中输入print 'hello',居然报语法错误!!!(SyntaxError: invalid syntax)
后来查询后发现,要这样输入: print('hello')才可以
在Python3.1中运行脚本也是同样的问题!!!
但是在Python2.7中就没有此问题
Python的版本真是头疼啊
页:
[1]
查看完整版本:
在Python Shell中输入print 'hello'总是报语法错误