【发布时间】:2020-05-05 20:01:50
【问题描述】:
Traceback (most recent call last):
File "p.py", line 1, in <module>
x = input("hello")
File "<string>", line 0
SyntaxError: unexpected EOF while parsing
当我在脚本中输入以下代码时出现此错误:
x = input("press enter to continue")
当我输入这个时也是这样:
input("press enter to continue")
再说一遍:
input('press enter to continue')
我在带有 linux beta 的 chrome acer 上运行 linux。它使用python 3。出了什么问题?
【问题讨论】:
-
你确定你使用的是python 3吗?
-
我在终端中输入了 python 3,然后它就可以工作了,但不是作为脚本的一部分。
标签: python python-3.x linux google-chrome chromebook