我刚刚安装了Python 3.1.3并尝试从Python Shell运行最基本的打印.下面是shell的ac/p.我已经迷路了.为什么会出现语法错误?从这里的东西判断它不应该.
Python 3.1.3 (r313:86834, Nov 27 2010, 17:20:37) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> print "test"
SyntaxError: invalid syntax
>>> print 'test'
SyntaxError: invalid syntax
>>>
Run Code Online (Sandbox Code Playgroud)
你正在使用python 3.在python 3中print是一个函数
print ("test")
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3702 次 |
| 最近记录: |