I have a string variable test
, in Python 2.x this works fine.
test = raw_input("enter the test")
print test
But in Python 3.x, I do:
test = input("enter the test")
print test
with the input string sdas
, and I get an error message
Traceback (most recent call last):
File "/home/ananiev/PycharmProjects/PigLatin/main.py", line 5, in <module>
test = input("enter the test")
File "<string>", line 1, in <module>
NameError: name 'sdas' is not defined