Mutable default arguments

The default value is evaluated once, when the function is defined. A list or dict default is therefore shared between every call, which is the most famous surprise in the language.

core~1hWe mark it against a checklist you can read first
The barWhat counts as knowing this

Spot a shared mutable default and fix it without changing the function's interface

That sentence is the bar. It only counts once your work shows you can do it. Reading about it does not.
Prove itA check for this one skill

Up to 3 questions on this skill alone, marked against the bar beside this. It stops as soon as the answer is clear. No account, and your answers are not kept.

01 · Prerequisites

You'll need these first

Start on Python Fundamentals

Every skill above, ordered by what depends on what, with the projects above that as the evidence you actually did it. We work out where you already are first, so the path skips what you can do.

About three minutes to set up. Nothing is marked until you hand something in.Start this path
Part of Python Fundamentals.

One cookie, so we can see which subjects people finish and where the site loses them — plus a replay of where you click. Nothing you type is recorded, and once you’re signed in the words on screen are blanked out too. No advertising, nothing sold. The detail.