나는 이것이 멍청한 질문이라는 것을 잘 알고 있지만 해결책을 찾지 못하는 것 같아서, 나는 프로그래밍에 익숙하지 않지만 배우려고 열심이다. 난 파이썬에서 처음으로 구글 clases를 통해 갈거야 그리고 이것은 내가 얻을 오류입니다.이름이 정의되지 않은 오류
def both_ends(s):
print s[0:2], s[3:5]
return
x = input('...: ')
both_ends(x)
[email protected]:~/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
문제가 무엇인지 설명하십시오.
는
감사합니다. 내 문제가 해결되어 도움이되었습니다. – Sergei