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 in Python by Dev
• 6,000 points
1,043 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 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
7,208 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,710 points
422 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 in Python by Samuel
• 460 points
26 views
+4 votes
7 answers
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,100 points
1,136 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,100 points
397 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,100 points
937 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,100 points
448 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 in Python by Nandini
• 5,480 points
81 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 in Python by Nandini
• 5,480 points
62 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