Print "Welcome to Python!" or print("Welcome to Python!")?

When I type:

print "Welcome to Python!"

Into Python 3.6.0 shell, it doesn't work, but:

print("Welcome to Python!")


I am doing this codeacademy python course to supplement my tertiary studies, and I have never coded before. Thanks for your feedback.


print "Welcome to Python!"                # <--- Python2
print("Welcome to Python!")               # <--- Python3

In Python2 print is a statement but in Python3 it's a function.
It was introduced with Python3.0. (What’s New In Python 3.0)


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.