我很清楚这是一个noob问题,但我似乎无法找到解决方案,我对编程很新,但渴望学习.我正在浏览python中的第一个google clases,这是我得到的错误.
def both_ends(s):
print s[0:2], s[3:5]
return
x = input('...: ')
both_ends(x)
sergei@sergei-MS-7253:~/Desktop/p2$ python test2.py
...: haloj
Traceback (most recent call last):
File "test2.py", line 10, in <module>
x = input('...: ')
File "<string>", line 1, in <module>
NameError: name 'haloj' is not defined
Run Code Online (Sandbox Code Playgroud)
请解释一下问题所在.
谢谢
| 归档时间: |
|
| 查看次数: |
2442 次 |
| 最近记录: |