Missing parentheses in call to ‘print’. did you mean print(…) – How to Resolve in Python

Hi friends, in this short tip, we will be discussing how you can easily resolve the error message: missing parentheses in call to ‘print’. did you mean print(…). This is a common syntax error message you might get, when coding in Python.


Reproducing the “Missing Parentheses” Python Error

In order to better understand the conditions under which we can get this syntax error message, let’s reproduce it via an example.

To this end, let’s try to execute the following command in Python:

print "test message"

If we try to execute the above “print” command in Python, we will be getting the following error message:

SyntaxError: Missing parentheses in call to ‘print’. Did you mean print(“test message”)?


How to Resolve the Error

In order to resolve the above error, as the error message suggests, we need to include the string to be printed on screen, within parentheses.

Therefore, based on the above example, the correct syntax would be:

print ("test message")

The above command, can be executed without any issues.


Learn more about SQL Server Data Access from Python – Enroll to our Course!

Enroll to our online course  “Working with Python on Windows and SQL Server Databases” with an exclusive discount, and get started with Python data access programming for SQL Server databases, fast and easy!

Working with Python on Windows and SQL Server Databases - Online Course
(Lifetime Access, Q&A, Certificate of Completion, downloadable resources and more!)

Enroll with a Discount



Featured Online Courses:


Read Also:


Check our online courses!

Check our eBooks!

Subscribe to our YouTube channel!

Subscribe to our newsletter and stay up to date!


Rate this article: 1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)


Reference: SQLNetHub.com (https://www.sqlnethub.com)

© SQLNetHub