PythonMastery

Learn Python the way you'll actually use it.

Short, focused lessons that take you from your first print() to writing real scripts — reading data, automating chores, building small tools you'll genuinely reuse. Runs in your browser. Works on a phone. Free forever.

196lessons
50h 56mtotal time
17paths
3.13Python version

Choose your path

196 lessons · 50h 56m total
Start here

Python Fundamentals

Start here if you've never written code. Variables, control flow, functions, lists, and dictionaries — the eleven concepts you need before anything else makes sense.

level
beginner
requires
no prior coding
length
19 lessons · 4h 33m
format
read → run → quiz
You’ll build: small Python scripts that handle user input cleanly and produce useful output.
0 / 19 lessons Start →

Python Intermediate

Once the basics click, this is where Python starts to feel useful — OOP, files, exceptions, comprehensions, decorators, and the techniques you'll lean on every day.

level
intermediate
requires
Fundamentals or equivalent
length
13 lessons · 3h 52m
format
read → run → quiz
You’ll build: a command-line task manager that uses classes, files, and proper error handling.
0 / 13 lessons Begin →

Python Advanced

The techniques that separate "Python user" from "Python engineer" — metaclasses, descriptors, async, typing, and performance work.

level
advanced
requires
Intermediate
length
9 lessons · 3h
format
deep dives
You’ll build: a small library with type hints, async I/O, and proper packaging.
0 / 9 lessons Begin →
build & ship

Projects

Apply what you've learned by building real, working Python programs you'll actually use. Each project walks through the build end-to-end, then hands you stretch goals to make it your own.

level
beginner
requires
Comfortable with Fundamentals
length
15 lessons · 6h 30m
format
guided build
You’ll build: real Python programs you can show your friends — a tip calculator, a guessing game, a TODO list, a password generator, and more.
0 / 15 lessons Begin →

Python How-To

Recipe-style answers to the things you'll actually Google later — scraping, APIs, CSVs, databases, automation, testing, logging, packaging.

level
intermediate
requires
any level — pick what you need
length
12 lessons · 4h
format
practical reference
You’ll build: eleven small tools you'll genuinely reuse — minimal dependencies on purpose.
0 / 12 lessons Begin →

Data Science Fundamentals

A gentler entry to data science — what it is, why it matters, and your first hands-on Pandas analysis. Intuition first, jargon never.

level
beginner
requires
Fundamentals
length
6 lessons · 1h 46m
format
guided
You’ll build: your first exploratory data analysis on a real CSV.
0 / 6 lessons Begin →

Machine Learning Fundamentals

Machine learning without the maths-degree pretence. Linear regression, classification, decision trees, and the metrics that actually matter.

level
beginner
requires
Fundamentals
length
6 lessons · 1h 25m
format
guided
You’ll build: a churn classifier you can explain to a non-engineer.
0 / 6 lessons Begin →

Deep Learning Fundamentals

Neural networks from intuition first, then Keras. CNNs for images, RNNs for sequences — and what every line of training code is doing.

level
beginner
requires
ML Fundamentals
length
7 lessons · 2h 42m
format
guided
You’ll build: an image classifier with the training loop you wrote yourself.
0 / 7 lessons Begin →

Generative AI & LLMs

How ChatGPT, Claude, and friends actually work — tokens, attention, embeddings, RAG, fine-tuning — and how to use them from Python.

level
intermediate
requires
Deep Learning Fundamentals
length
6 lessons · 2h 12m
format
applied
You’ll build: a retrieval-augmented assistant over documents you supply.
0 / 6 lessons Begin →

Data Science & ML

NumPy, Pandas, Matplotlib, and just enough statistics to not embarrass yourself. Real datasets, real questions, no toy examples.

level
intermediate
requires
Fundamentals
length
9 lessons · 3h 15m
format
applied
You’ll build: an end-to-end analysis of a real dataset — load, clean, plot, explain.
0 / 9 lessons Begin →

AI & Deep Learning

Neural networks, CNNs, NLP, GANs, and how the production AI stack actually fits together. Theory where it earns its place, code where it doesn't.

level
advanced
requires
Data Science
length
9 lessons · 4h 11m
format
applied + project
You’ll build: image classifier and an NLP pipeline — not toy demos, near-production code.
0 / 9 lessons Begin →
ship the app

Web Frameworks

Flask, FastAPI, and Django — when each fits, how to build a working app in each, and the patterns production teams actually ship. Auth and database wiring come next door.

level
intermediate
requires
Fundamentals + a touch of Intermediate
length
12 lessons · 4h 38m
format
guided build
You’ll build: working APIs and apps in all three frameworks — pick one, or pick the right one per project.
0 / 12 lessons Begin →
lock the doors

Auth & Security

Password hashing, sessions, JWT, OAuth2 with real providers, and the OWASP-flavoured security checklist every web app needs before it goes live.

level
intermediate
requires
Web Frameworks (or general HTTP literacy)
length
4 lessons · 1h 31m
format
guided build
You’ll build: a hardened login system you can drop into any Flask or FastAPI app.
0 / 4 lessons Begin →
ship & operate

DevOps & Deploy

Docker, GitHub Actions, environment management, and secret handling — the boring-but-critical layer between 'works on my laptop' and 'works in production'.

level
intermediate
requires
Intermediate Python + comfort with the command line
length
4 lessons · 1h 34m
format
guided
You’ll build: a Python project containerised, tested in CI, and deployed with secrets handled properly.
0 / 4 lessons Begin →
production data

Databases (Production)

Beyond SQLite — Postgres with psycopg/asyncpg, Redis for caching and queues, MongoDB for document data, plus ORM patterns that don't blow up in production.

level
advanced
requires
Intermediate (fileio, exceptions) and How-to databases
length
4 lessons · 1h 49m
format
guided
You’ll build: the data-layer skills to move a side project from SQLite to a real production database.
0 / 4 lessons Begin →
when it breaks

Errors

Every Python error you are likely to meet, from a stray indent to a service falling over at 2am. What Python is actually complaining about, the code that causes it, and the fix — with the examples runnable here.

level
reference
requires
any level — bring the traceback
length
45 lessons · 2h 28m
format
look it up → fix it
You’ll build: the habit of reading a traceback and knowing, in one look, which line is lying to you.
0 / 45 lessons Look it up →
look it up

Reference

Cheat sheets and a glossary for when you have forgotten the syntax rather than broken something — comprehensions, slicing, f-strings, datetime, regex. No fluff, just the answer.

level
reference
requires
any level — when you need a fast answer
length
16 lessons · 1h 30m
format
reference
You’ll build: a single source of truth for the Python syntax and terms you'll Google a hundred times.
0 / 16 lessons Begin →
write it better

Tips & tricks

Short, practical habits that experienced Python developers rely on: the before, the after, why it works, and when not to use it. Plus how real projects like Dropbox and Spotify used these ideas at scale.

level
any
requires
any level — dip in anywhere
length
31 tips · 5 case studies
format
before → after, runnable
You’ll pick up: the small habits that separate code that works from code you’re happy to hand over.
31 tips Browse →
learn from others

Lessons from incidents

Real outages, lost data and a malicious package (Cloudflare, GitLab, PyPI): what went wrong, told from each company’s own write-up, and the habit that would have caught it. Every story ends in code you can run.

level
intermediate
requires
basic Python
length
3 incidents
format
story → cause → runnable fix
You’ll pick up: the checks that stop a small mistake becoming a public post-mortem.
3 incidents Read →

Tools that come with it

for the data science, ML and AI tracks

The data tracks assume you can actually run things. You can — scikit-learn, XGBoost, LightGBM, pandas and statsmodels all execute in this tab, with no install, and your code never leaves your device. Train a model, score it on a test split, plot the result. PyTorch and TensorFlow are the honest exceptions: no WebAssembly build exists, so those lessons ask you to run locally and say so plainly.

Charts render as high-resolution images, and Plotly figures render live — drag to rotate a 3D scatter or spin a loss surface, which is the difference between seeing a cluster and understanding one.

Before you start.

a short, honest note — worth two minutes.

What you'll get

  • A working understanding of Python in roughly twelve hours of focused time.
  • Real, useful scripts before the end of the second path.
  • Lessons that run on whatever device you have — phone, school laptop, anything.
  • Free, forever. Your code stays in the browser.

What we won't pretend

  • This won't make you a senior engineer. Real depth comes from building your own things.
  • It won't replace a CS degree if a job filter demands one.
  • We don't cover every library — only the ones you'll actually reach for.
  • The hard parts stay hard. We just refuse to dress them up.

More is on the way

stay tuned — the site is still being written

196 lessons, 45 error write-ups and 31 tips is where we are, not where we stop. Two of the things promised here have shipped; the next two are being written now, in this order. There is no newsletter and no notify me box — bookmark the site and look in again, and if you want one of these sooner, say so with the feedback button. That is genuinely how the order gets decided.

✓ Shipped

Before and after, side by side

Now live as Tips & tricks: 31 tips, each putting the beginner version next to the Pythonic one, with why it’s better and when the short form is the wrong call.

Browse the tips →
✓ Shipped

A mistakes companion to the error pages

The code that never raises anything, now in the tips: the mutable default argument, the bare except, the comparison against True, the list doing a set’s job, is where you meant ==.

See the tips →
Coming next

Short answers to “how do I…?”

The How-to track already has in-depth recipes. Next: one short, runnable page per question people actually type — read a CSV, call an API, parse JSON, talk to SQLite — instead of a forum thread from 2014 with three contradictory replies.

Coming next

A map from zero to employable

Seventeen tracks is a lot of doors. One page that puts them in order — what to learn first, what can wait, and what you genuinely do not need yet.

Everything already here stays free, and everything new arrives the same way — no account, no paywall, no email gate.

pricingFree, forever.

No paywall, no premium tier, no email gate. Your code runs in your browser, not on servers we rent, which is what makes free possible. There are no ads today; when they arrive they'll be clearly labelled, and the lessons stay free either way.