I just started into Python today and got a lot working in a few hours. But this has me stumped.
I copy and paste (no typos) these two lines from a Python help site into the Terminal:
Thanks.
I copy and paste (no typos) these two lines from a Python help site into the Terminal:
val = input("Enter your value: ") print(val)and the result is:
Error:>>> val = input("Enter your value: ")
Enter your value: print(val) my input
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<string>", line 1
print(val) my input
^
SyntaxError: invalid syntax
The print(val)
line runs into the input line. I typed "My input". It all just runs together. Thanks in advance to anyone who can tell me what's wrong here.Thanks.