fX Engineers Explore the community
Notes published · roadmap completeFoundation

Python Foundations

Programming from zero to engineering.

Variables, functions and loops first. Then data structures, object orientation, memory, iterators and concurrency - and eventually how Python itself works, because knowing why a list append is amortised O(1) is the difference between using a language and understanding one.

Who this is for

Anyone who can follow a tutorial but could not explain what happens in memory when they write x = [1, 2, 3]. If you have written production Python for two years, start at level 3.

Prerequisites

None. A laptop and a terminal you are not afraid of.

Beginner PythonProblem solvingData structuresObject-oriented programmingPython internalsEngineering applications

The roadmap

Levels, in order, marked with where they actually are. Nothing here is marked published until it is.

Level 01Writing PythonValues and types · Control flow · Functions · Errors and debuggingIn progress
Level 02Thinking in data structuresLists, dicts, sets · Complexity · Iterators and generators · ComprehensionsIn progress
Level 03Designing programsModules and packages · Classes and protocols · Testing · TypingPlanned
Level 04Under the interpreterObjects and references · Memory and the GC · The GIL · BytecodePlanned
Level 05Python as an engineering toolNumPy and vectorisation · Profiling · Concurrency · PackagingPlanned

How to study this

Including the things I did not write. Recommending better sources than my own costs me nothing and saves you months.

  • Type every example. Do not copy-paste - the typos are where the learning is.
  • Work alongside Python Crash Course (Matthes) for level 1, then Fluent Python (Ramalho) from level 3 onward. Both are better than anything I will write.
  • A level takes most people three to six weeks at a few hours a week. Nobody finishes level 4 in a weekend.
  • When something surprises you, write a note about it. That is the whole method.