Python Fluency
Choose it before you type it
You can already read Python. This is where you stop writing the first thing that works: pick the container the problem actually asks for, order records by three criteria at once, and turn six lines into the one line a person would rather read.
- Modules
- 7
- Drills
- 12
- Build steps
- 7
- Time
- ~5h
Walk out with
A standings analyzer that ranks a season on points, then goal difference — and the reflex of reaching for the right container without stopping to think.
What you'll do
Pick the container
Lists, tuples, dicts, sets — and which one the job wants.
See what else changed
Aliases, shallow copies, the default that remembers.
Loop, order, reshape
Idiomatic loops, key functions, ties, comprehensions.
Make it better
Clearer calls — then rewrite code without changing it.
The pitch
What you practise, and what you leave with
A standings analyzer: match results in, a ranked table out, ties broken on goal difference and then goals scored.
You will practise
- Pick the container a requirement asks for
- Spell the line Python wants, from memory
- Sort records by a tuple key
- Choose the clearer of two versions
Afterwards you can
- Choose a representation on purpose
- Rewrite an index loop the Python way
- Order by more than one criterion
- Improve working code without breaking it
Modules
7 modules, 34 items
Lessons explain one idea. Drills repeat it until it sticks. Build steps make something that exists afterwards.
- 1
Choose the shape
~38 minRead a requirement and pick the type that answers it, before typing anything.
- LessonWhy the shape comes first5 min
- LessonFour questions, one answer11 min
- DrillPick the container10 min
- Build stepShape the season12 min
- 2
What else changed
~35 minPredict what a copy actually copied, and what a shared default remembers.
- LessonThe copy that copied nothing10 min
- DrillHow deep the copy went10 min
- LessonThe default that is built once7 min
- DrillThe default that remembers8 min
- 3
Loop like the language
~34 minReplace index arithmetic and accumulators with the built-ins that already do them.
- LessonStop counting by hand8 min
- DrillRewrite the loop10 min
- LessonThe loop that was a built-in7 min
- DrillLet the built-in do it9 min
- 4
Put things in order
~55 minRank records by a key, break ties on a second field, and predict a stable result.
- LessonSorted by what, exactly7 min
- LessonTwo criteria, one key7 min
- DrillSort the records11 min
- LessonStability, and what it buys7 min
- DrillTies and stability11 min
- Build stepRank the season12 min
- 5
Change the shape
~48 minTurn data from one shape into another — and know when one line is worse than four.
- LessonOne line that earns it9 min
- DrillRead the comprehension10 min
- LessonWhere one line stops helping7 min
- DrillWhich would you rather read12 min
- Build stepReshape the table10 min
- 6
Say what you mean
~35 minWrite calls that explain themselves — then spell the common lines from memory.
- LessonCalls you can read8 min
- DrillWhat the call binds9 min
- LessonReturn it rather than print it6 min
- DrillSay it in Python12 min
- 7
Make it better
~1hName the defect, rewrite it without changing the output, then finish the analyzer.
- LessonName it before you fix it8 min
- DrillFind the defect11 min
- LessonWhat a rewrite must not change5 min
- Build stepRewrite without changing it14 min
- Build stepSay why it is better8 min
- Build stepPrint the table11 min
- Build stepFinish the analyzer12 min
More in Languages
Keep going
Python Foundations
Read a program before you run it. Then write one worth showing.
Foundational~6h8 modules
Python Confidence
Somebody else wrote it. Find out whether it works.
Advanced~7h7 modules
Python Craft
It works. Now make it somebody else's.
Advanced~10h7 modules
Python Design
It works. It is also the wrong shape.
Advanced~8h7 modules
Choose the shape before you type. Then say it in one line.
The first item is free. ~5h of focused work, at your own pace.
Intermediate~5h7 modules