What does SyntaxError Missing parentheses in call to print mean in Python

0 votes

When I try to use a print statement in Python, it gives me this error:

print "Hello, World!"
 File "<stdin>", line 1
 print "Hello, World!"
                        ^
SyntaxError: Missing parentheses in call to 'print'

What is the meaning of this?

Feb 14, 2022 in Python by Dev
• 6,000 points
3,784 views

1 answer to this question.

0 votes

This error is generated when one is using older version  Python 2, in Python 3 parentheses are required to call print statements.

print('Hello,  World!')

Output

Hello,  World!
print 'Hello, World!'
File "<ipython-input-2-5fea38df3ff9>", line 1
    print 'Hello, World!'
          ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('Hello, World!')?

Python treats this as a syntax error and also gives a clear hint to use parentheses.

answered Feb 14, 2022 by Nandini
• 5,480 points

Related Questions In Python

0 votes
1 answer

SyntaxError: Missing parentheses in call to "print".

The statement print "hello python" does not work in ...READ MORE

answered Jul 16, 2019 in Python by Umar
8,104 views
0 votes
1 answer

What does ' -> ' mean in Python function definitions?

It's a function annotation. In more detail, Python 2.x ...READ MORE

answered May 23, 2018 in Python by charlie_brown
• 7,720 points
923 views
0 votes
0 answers

In Python, what does a "r" mean before a string?

In Python, what does a "r" mean ...READ MORE

Nov 17, 2022 in Python by Samuel
• 460 points
396 views
0 votes
0 answers

What does %s in a Python format string mean?

For example, in the below code if len(sys.argv) ...READ MORE

Sep 5, 2023 in Python by Satyawrat
• 460 points
322 views
0 votes
1 answer

Crawling after login in Python

You missed a few login data forms, ...READ MORE

answered Sep 7, 2018 in Python by Priyaj
• 58,020 points
1,696 views
0 votes
1 answer

Crawling after login in Python

You missed a few login data forms, ...READ MORE

answered Sep 14, 2018 in Python by Priyaj
• 58,020 points
870 views
0 votes
1 answer

“stub” __objclass__ in a Python class how to implement it?

You want to avoid interfering with this ...READ MORE

answered Sep 27, 2018 in Python by Priyaj
• 58,020 points
2,376 views
+1 vote
1 answer

How is raw_input() and input() in python3.x?

raw_input() was renamed to input() so now input() returns the exact string ...READ MORE

answered Oct 30, 2018 in Python by Priyaj
• 58,020 points
914 views
0 votes
1 answer

What is the use of "assert" in Python?

The statement assert exists in almost every programming ...READ MORE

answered Feb 7, 2022 in Python by Nandini
• 5,480 points
580 views
0 votes
1 answer

Is there a way to create multiline comments in Python?

In Python, you can use '''  some ...READ MORE

answered Feb 7, 2022 in Python by Nandini
• 5,480 points
508 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP