python
17 free lessons tagged python across Programming, Business, AI. Each one is a short sequence of focused steps with narration and a five-question quiz at the end — take them in any order, no signup required.
Debugging and Problem Solving: What to Do When Code Breaks
Every program breaks, so learn to fix one fast: the three kinds of error, reading a traceback from the bottom up, the beginner errors and their exact messages, print and debugger techniques for logic bugs, tests with assert, and a problem-solving routine plus a way to keep practising.
Functions, Lists, and Dictionaries: Organising a Program
Split a program into named functions with parameters and return values, and hold data in lists and dictionaries. Learn why return is not print, what local scope protects, the accumulator pattern, how to choose list or dictionary, and the aliasing trap, then build a monthly budget checker.
Decisions and Loops: Making a Program Choose and Repeat
Teach a program to react and repeat: booleans and comparisons, if/elif/else chains where order is logic, while and for loops, range() and its excluded stop, break and continue, and the skill that matters most, tracing a loop by hand. Ends with a working number-guessing game.
What a Program Is: Values, Variables, and Your First Script
Start from zero: what a program actually is, how to run Python in the shell or as a script, the four basic types, arithmetic expressions, variables as names, strings and f-strings, and why input() always hands you text. You finish by writing a working bill-splitting program.
Does it work? Testing supply and demand zones honestly
Decades of research on support, resistance and chart rules find effects that are real, small and fragile. This lesson reviews that evidence, shows why a bounce rate is not a profit, and builds a mechanical zone detector in Python so the method's own predictions can be tested.
CPython: the GIL and free-threading
Why CPython has a Global Interpreter Lock, what it does and does not protect, and how the three concurrency models differ. Then how PEP 703 free-threading removes the GIL using per-object locks and biased, deferred, and immortal reference counting, plus the tradeoffs that keep it opt-in.
CPython: reference counting and the cyclic GC
How CPython reclaims memory: immediate reference counting for the common case, plus a generational cyclic garbage collector that catches the reference cycles counting cannot. Covers what changes a refcount, generations and thresholds, the gc module, __del__ and weakref, and why a process's memory does not always shrink.
CPython: bytecode and the interpreter loop
What actually runs when you run Python: the compiler turns source into a code object of bytecode, and a single C evaluation loop executes it on a stack machine, one frame per call. Covers code objects, the dis module, the value stack, frames, and the adaptive specializing interpreter.
CPython: the object and data model
How Python values really work under the hood: every value is a heap object with a type and a reference count, names are references not boxes, and behavior comes from the data model's dunder methods. Covers identity versus equality, attribute lookup order, descriptors, and __slots__.
SQLAlchemy 2.0 async ORM in production
SQLAlchemy 2.0 from the production angle. The engine/session/transaction layering, the typed declarative, the identity map, the N+1 query problem, async-only gotchas (no lazy loading), savepoint nesting, and the connection-pool knobs that decide whether the backend survives load.
FastAPI dependency injection and the request lifecycle
Dependency injection as a pattern, FastAPI's Depends as one concrete implementation. Sub-dependencies and per-request caching, yield-based cleanup, where Pydantic v2 validation runs, lifespan-scoped resources, BackgroundTasks vs real queues, and the override trick that makes the whole thing testable.
Advanced Python typing for backend
Python's type system has two audiences — static checkers and runtime frameworks. Generics, Protocol, TypedDict, ParamSpec, type narrowing, and runtime introspection, framed as the spec that Pydantic, FastAPI, and SQLAlchemy actually execute.
Async Python and asyncio
Async Python from the bytecode up. Coroutines vs return values, how the event loop schedules tasks, when async beats threading or multiprocessing, structured concurrency with TaskGroup, and the cancellation rules that production backends live or die by.
Designing a Production Agent Harness
Move beyond toy ReAct loops. Learn how to build a production-grade agent harness with a robust control loop, tool registry, schema validation, retry logic, token budgets, abort signals, and a persistent journal that survives crashes.
Building MCP Servers in Python and TypeScript
Learn to build Model Context Protocol servers from scratch using the official Python and TypeScript SDKs. Cover tool schemas, resource URIs, prompt templates, and how Claude Code, Claude.ai, and Cursor consume them.
LangChain: Building Your First LLM Application
A beginner's guide to LangChain, the popular framework for composing applications with Large Language Models. Learn the core concepts of Models, Prompts, and Chains, and build a simple application using the LangChain Expression Language (LCEL).
Apache Airflow: Orchestrating Data Pipelines
Dive into Apache Airflow, the powerful platform for programmatically authoring, scheduling, and monitoring complex data workflows. Learn about DAGs, operators, and how to build robust, scalable pipelines for modern data engineering.

