Python for Beginners / Chapter 1 — Getting started (lessons 1–8) / Lesson 1

Setting up and Hello World

Time needed: about 5 min (estimate)

☆ Read later

You can try the opening of this lesson without an account.

What kind of language Python is

Python is a language where you write very little for what you get.

Printing something on screen takes one line.

It is used for automating work, web apps, data analysis and AI, and scraping — a wide range, but whichever direction you go, the fundamentals of the syntax are the same.

Let us start by getting a working environment.

Installing and checking

Get the installer from the official site, python.org/downloads.

On Windows, make sure you tick "Add python.exe to PATH" on the first screen.

Once it is installed, check it from your terminal (the Command Prompt on Windows).

Terminal

# macOS / Linux $ python3 --version Python 3.14.2 # Windows > py --version Python 3.14.2

Three commands is confusing at first, but it is simple once laid out.

python3 is how you name version 3 explicitly on macOS and Linux, py is a Windows-only launcher, and python points somewhere different depending on the environment, so it is safest avoided.

Writing your first line

We will use VS Code as the editor.

Two extensions are enough: your language pack and "Python".

Create a folder whose name contains no spaces or non-ASCII characters, create a file called hello.py, and write the following (on this site you can run it directly in the editor below).

editor.py

Tab indents. To leave the editor, press Esc, then Tab.

Create a free account to keep reading

With an account you can read the rest of this lesson, take the quiz, and read every free lesson in this course. Lessons you answer correctly are recorded as complete.

Report a problem with this lesson

Log in to send a report.

Keyboard shortcuts

Keys available in a lesson
KeyAction
[ or Alt + ←Go to the previous lesson
] or Alt + →Go to the next lesson
?Open this list
EscClose this list

The keys do not work while the cursor is in a code editor or an input field.