enumerate and zip — the loops AI writes when it's not lazy — step 7 of 9
Claude wrote a loop that pairs names with roles, but roles has
one fewer entry than names, so riley is silently dropped from the
output. The script should still print three lines — for any name with
no matching role, print name: unknown.
Replace the zip call so missing roles fall back to "unknown".
Expected output:
maya: founder
marcus: eng
riley: unknown
The break is on line 6 — but read the whole snippet first.
⌘↵ runs the editor.read, then continue.
Claude wrote a loop that pairs names with roles, but roles has
one fewer entry than names, so riley is silently dropped from the
output. The script should still print three lines — for any name with
no matching role, print name: unknown.
Replace the zip call so missing roles fall back to "unknown".
Expected output:
maya: founder
marcus: eng
riley: unknown
The break is on line 6 — but read the whole snippet first.
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.