Python Get Started
You can run Python in this tutorial without installing anything. To use it outside the browser, install the official build from python.org.
Three ways to run Python
| Way | How |
|---|---|
| In this tutorial | Click Open the Python Editor » on the home page — runs in your browser via Pyodide. |
| Interactive REPL | Run python in a terminal. Type expressions, see results. |
| Script file | Save code to hello.py, then python hello.py in the terminal. |
Your first script
PYTHON — hello.py
# hello.py
print('Hello, world')
print('2 + 3 =', 2 + 3)
Run it:
SHELL
$ python hello.py Hello, world 2 + 3 = 5
Editor choices
- VS Code — free, the most common Python editor. Add the official Python extension.
- PyCharm — JetBrains' Python IDE; Community Edition is free.
- Jupyter — notebook style, great for data work.
- Just a text editor + terminal — works fine. That's how the language was designed to be used.
Tip: Install the latest stable Python 3.x. Avoid the system Python on macOS/Linux for development — use
pyenv or the python.org installer so updates don't break the OS.Example
Exercise
The standard Python source file extension is…
hello.
Two letters.
Discussion
Loading…