<分区> 分区>
我很清楚这是一个菜鸟问题,但我似乎找不到解决方案,我对编程很陌生,但渴望学习。我正在使用 python 浏览第一个 google 类,这是我得到的错误。
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
请解释问题所在。
谢谢
