Explore Courses Blog Tutorials Interview Questions
0 votes
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 science online courses

Related questions

Browse Categories