How does one extra type test turn a shallow my_rev into a five-line deep_rev that reverses arbitrarily nested lists all the way down?
Short drills on what this video just taught. Write the code, run the checks, and reveal the answer only if you are stuck.
deep_rev reverses every level of nesting, descending into lists and stopping at anything that is not a list. Here is a list it has never seen:
[1, [2, 3], [[4, 5], 6]]
Work out what deep_rev hands back for it — on paper, in your head, one element at a time — and assign that result to deep_reversed as a plain list literal. No code, no calls: this one is a hand trace.