Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Data Science by (18.4k points)

When I am working on python I am getting this below error:

>>> print "hello World"

  File "<stdin>", line 1

    print "hello World"

                      ^

SyntaxError: invalid syntax

1 Answer

0 votes
by (36.8k points)

In python version 3 need to follow the below syntax:

print("Hello World")

The print statement should be followed by a parenthesis.

Improve your knowledge in data science from scratch using data scientist

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...