Six lessons covered the everyday toolbelt — pathlib, **dict unpacking, enumerate and zip, slicing, defaultdict and Counter. Eight questions, 80% to pass.
One quiz to go and we're done.
When you pass: 30 lessons, the second-layer kit complete. Files, exceptions, comprehensions, function patterns, dict patterns, the standard library — every primitive a 100-line script needs.
| Lesson | Concept | Key syntax |
|---|---|---|
| 22 | pathlib.Path | Path(p).read_text(), .write_text(...), p.parent, p / "x" |
| 23 | **dict unpacking | f(**dct), {**a, **b} |
| 24 | enumerate + zip | for i, x in enumerate(xs), for a, b in zip(xs, ys) |
| 25 | Slicing | xs[start:stop:step], xs[::-1] |
| 26 | defaultdict + Counter | auto-create on missing key; count and rank |
| 27 | Synthesis | pathlib + Counter + JSON |
By passing this quiz, you've worked through the second layer of Python primitives:
open modes, with, pathlibtry / except, named exception types, else / finally (preview), retry patterns*args, **kwargs, **dict spreadsetdefault, defaultdict, Counter, ** mergecsv, json, re, datetime, pathlib, collectionsenumerate, zip, slicing, sorted(key=...), lambdaCombined with Foundations, you have what you need to read and write any standalone Python script. Next track in the series — Python Mastery — adds classes, decorators, generators, type hints, and tests.
Create a free account to get started. Paid plans unlock all tracks.
Six lessons covered the everyday toolbelt — pathlib, **dict unpacking, enumerate and zip, slicing, defaultdict and Counter. Eight questions, 80% to pass.
One quiz to go and we're done.
When you pass: 30 lessons, the second-layer kit complete. Files, exceptions, comprehensions, function patterns, dict patterns, the standard library — every primitive a 100-line script needs.
| Lesson | Concept | Key syntax |
|---|---|---|
| 22 | pathlib.Path | Path(p).read_text(), .write_text(...), p.parent, p / "x" |
| 23 | **dict unpacking | f(**dct), {**a, **b} |
| 24 | enumerate + zip | for i, x in enumerate(xs), for a, b in zip(xs, ys) |
| 25 | Slicing | xs[start:stop:step], xs[::-1] |
| 26 | defaultdict + Counter | auto-create on missing key; count and rank |
| 27 | Synthesis | pathlib + Counter + JSON |
By passing this quiz, you've worked through the second layer of Python primitives:
open modes, with, pathlibtry / except, named exception types, else / finally (preview), retry patterns*args, **kwargs, **dict spreadsetdefault, defaultdict, Counter, ** mergecsv, json, re, datetime, pathlib, collectionsenumerate, zip, slicing, sorted(key=...), lambdaCombined with Foundations, you have what you need to read and write any standalone Python script. Next track in the series — Python Mastery — adds classes, decorators, generators, type hints, and tests.