Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

First script - hello world

print("Hello World")
  • Create a file called hello.py with the above content.
  • Open your terminal or the Anaconda Prompt on MS Windows in the directory (folder)
  • Change to the directory where you saved the file.
  • Run it by typing python hello.py or python3 hello.py
  • The extension is .py - mostly for the editor (but also for modules).
  • Parentheses after print() are required in Python 3, but use them even if you are stuck on Python 2.