Python:Hello World

From Progzoo
Revision as of 06:13, 21 November 2009 by Spoon! (talk | contribs)
Jump to: navigation, search

The number one program is Hello World. This program prints the string "Hello World".

[Font] [Default] [Show] [Resize] [History] [Profile]

Caution: The above code is only valid for Python 2.x. In Python 3.x, print has become a function and it is necessary to enclose the argument in parentheses:

print("Hello world")

This version of the code will also work on 2.x, in the case when there is only one argument.