Python-Console(Anaconda 4.2.0(64位)):输入不是字符串而是“变量”?

时间:2017-01-21 21:50:26

标签: python-2.7 anaconda

我正在使用

Python 2.7.12 | Anaconda 4.2.0(64位)| (默认,2016年6月29日,11:07:13)[MSC v.1500 64位(AMD64)]在win32上

Windows 7上的

。字符串输入函数效果不佳。

2.7.12 | Anaconda 4.2.0(64位)| (默认,2016年6月29日,11:07:13)[MSC v.1500 64 bit(AMD64)] Python输入“帮助”,“版权”,“信用”或“许可”以获取更多信息。

name = input ("Please enter your name:")
Please enter your name:Othmar
Traceback (most recent call last):
  Python Shell, prompt 1, line 1
  File "<string>", line 1, in <module>
NameError: name 'Othmar' is not defined

我在Eclipse中使用Python-consoleprompt和IDE wing-101在CLI上尝试过这个。这是完全相同的结果。

这里有什么问题?

0 个答案:

没有答案