Python Forum

Full Version: Invalid Syntax when using print?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
print("test")
Thats the code and it's saying invalid syntax.

Another thing that is giving me an invalid synatx is

print("  /")
i'm using python 3.6.0.
Are you sure there isn't a syntax error on the previous line?
Neither of those should be giving invalid syntax, is there more code before this that could actually have the error.
Update:

this is giving me invalid syntax now.

print(10 % 3)
You're not heeding advise, post code prior to your print statement.
It's likely that something as simple as a close parenthesis in the previous line of code is causing your syntax error.