Part 01 / Topic 6 of 7
Python versions
Python 2 ended in 2020. Today everything uses Python 3. In this course we use 3.13+.
Real-world example: An old tutorial writes print "Hi". That is Python 2 and gives an error in Python 3.
| Version | Note |
|---|---|
| 2.7 | ❌ Dead since Jan 2020. Do not use. |
| 3.x (older) | Works, but misses new features and speed-ups |
| 3.13+ | ✅ Better error messages, new REPL with colours, faster |
A new 3.x version comes out every October and gets about 5 years of fixes.
import sys
print(sys.version_info >= (3, 13)) # compares (major, minor) with 3.13
# True (if you have 3.13 or newer)
🧪 Quick quiz — answer from memory, then check.
- An old tutorial writes
print "Hi"with no brackets — which Python is that? - How often does a new Python 3.x version come out, and how long does it get fixes?
Show the answers
- Python 2, dead since January 2020. In Python 3,
printneeds brackets. - Every October, with about 5 years of fixes.
Read more: each release's changes, on the official What's New pages.
Done here? The practice set for Part 1 — 6 exercises with solutions — is on the part page.