Error guide · SyntaxError
SyntaxError: Missing parentheses in call to 'print'
You wrote print the old Python 2 way.
Example
print "Hello"
What Python says
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
As printed by Python 3.12. Other versions may word it slightly differently.
Why it happens
In Python 3, print is a function, so its value goes inside brackets. Older tutorials and books written for Python 2 show print "Hello", which no longer works. Python recognises the old style and suggests the fix in the message.
How to fix it
print("Hello")
Output: Hello
Tips
- Always write
print(...)with brackets. - When copying old code, also look for
raw_input, which is nowinput. - Prefer tutorials written for Python 3.