0

我刚刚开始使用python3.3。外壳看起来像这样:

Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> print ("hello world")

它打印 hello world correclty,但在命令行中显示第 1 行错误(即 Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64) ] 在 win32 上)将其声明为语法错误。

问题是什么??

4

2 回答 2

1

您在命令行上错误地指定了语法。正确的语法是:

$ python3 -c 'print ("hello world")'
于 2013-09-19T14:48:45.150 回答
0

那不是错误。这就是当您通过键入打开交互式解释器时出现的内容$ python3,告诉您您拥有的 python 版本和其他详细信息(例如日期)。

于 2013-09-19T09:15:57.773 回答