Programming

Learn Python in Depth

Classes and Python's data model, built from the objects of mathematics: points, fractions, polynomials, vectors, matrices, integers mod n and quaternions. Every program runs in your browser.

Free to start · adaptive placement finds your level · reviews timed to your own forgetting.

30 lessons in Python in Depth

A class is a new typeMethodsEvery object its ownHow an object printsWhen are two objects equal?A fraction that keeps itself tidyArithmetic on your own typeMixing with plain numbersComparing and sortingObjects in sets and dictsRead-only attributesShared by the whole classOther ways to build oneA polynomial you can callLength and indexingVectorsMatrices and @Truth and membershipIterating your own objectInheritancesuper()Duck typingYour own exceptionswith: context managersDataclassesFrozen dataclasses and defaultsEnumerationsIntegers mod nHas-a or is-aProject: quaternions

Built to be understood — and remembered.

Every idea is taught with motivation and a worked example before the drills, and an FSRS spaced-repetition engine schedules each review for the day its model predicts you would forget it. A short placement check finds what you already know, so you start Python in Depth exactly where it's useful.

Related Programming subjects