LPTHW Exercise 1: A Good First Program

Learn Python the Hard Way by Zed Shaw .: The traditional Hello World program. Print in Python 2 encloses the statement in quotes while Python 3 adds brackets (and brackets format is backward-compatible to Python 2 but not vice-versa):

>>> print "Hello World!"
Hello World!
>>> print("Hello World!")
Hello World!

More • pythonprogramming