Type the text below into a text editor and save as hello.py. Python files usually have the .py extension.

#!/usr/bin/env python3

print('hello world')

You can use any text editor to create a Python program. I recommend using a text editor that supports syntax highlighting (text colouring) and line numbers.

Related course: Complete Python Bootcamp: Go from zero to hero in Python

Run Python

To start the program, we have to open the command line and type:

python hello.py


You should see a line of text showing “hello world”.
python windows


Try the exercises below:

  1. Make a Python program that prints your name.
  2. Make a program that displays the lyrics of a song.

After completing these continue with the next exercise.