Syntax error on print with Python 3

Viewed 263280

Why do I receive a syntax error when printing a string in Python 3?

>>> print "hello World"
  File "<stdin>", line 1
    print "hello World"
                      ^
SyntaxError: invalid syntax
3 Answers

In Python 3, print became a function. This means that you need to include parenthesis now like mentioned below:

print("Hello World")
Related