Nat*_*han 3 python macos shell syntax-error python-idle
我更新到Python 3.1.3(我有OS X 10.6).
如果我输入python终端,我会得到一个有效的2.6.1环境.
如果我输入python3终端,我会得到一个3.1.3环境.在我做某事之前,一切看起来都很好.如果我尝试运行print "hello",我会收到语法错误.
这个问题在IDLE中是一样的.
我尝试删除3.1的所有内容,然后重新安装,但它没有工作.
想法?
提前致谢!
Sve*_*ach 10
在Python 3.x中,print是一个函数,所以使用
print("Hello")
Run Code Online (Sandbox Code Playgroud)
代替.