General Edit

The Hello World! is a small program and traditionally the first for newcomers.

Syntax Edit

Interactive Edit

If you like to typ it into the interactive environment, you have to start it with


and then you type in:

>>> print('Hello World!')

and you will get:

>>> print('Hello World!')
Hello World!

If you have Python 2.X, you type:

>>> print 'Hello World!'
Hello World!

In File Edit

The classical 'Hello World!' is in Python 2.X just like this:

#!/usr/bin/env python
print 'Hello World!'

If you have Python 3.X, you must type in:

#!/usr/bin/env python
print('Hello World!')
Community content is available under CC-BY-SA unless otherwise noted.