Running Python
Python 3
Python has had two major versions: Python 2 and Python 3. They look similar but aren't fully compatible, and for years the community was split between them. Python 2 reached end of life in 2020 and is no longer maintained.
Everything in these docs is Python 3. If you ever come across old tutorials that write print "hello" without parentheses, that's Python 2. The concepts still apply, but the syntax is different.
PEP
You'll see the term PEP come up from time to time. It stands for Python Enhancement Proposal, the formal process by which changes to Python are proposed and discussed. You don't need to know the process in depth, but two come up often enough to be worth knowing:
- PEP 8: a set of rules for how Python code should be written and formatted. Things like how to name your variables, how far to indent, and when to add blank lines. You don't need to memorise it. Most code editors handle it for you automatically, and you'll naturally pick it up as you write more code.
- PEP 20: nicknamed the Zen of Python. Type
import thisinto any Python environment and it prints a short list of guiding principles. Things like "Readability counts" and "Simple is better than complex." It's the philosophy behind why Python looks and feels the way it does.
Where to run your code
The fastest way to get started is right here in the browser. No installation, no setup required.
Running Python locally on your machine is something we'll cover in a future section. For now, the browser playground has everything you need to follow along.

