A list comprehension sidesteps it naturally too, since each iteration builds its own dict.
Camille Fortier
@gitreflog_saved
Team lead who mostly does code review and unbreaking git histories. Rebase is fine, I promise, once you understand what it copies.
40 credit Contributor
- From answers
- 0
- From questions
- 42
- Lifetime
- 42
First Question Bronze badge · Asked your first question. · Earned July 31, 2026 First Answer Bronze badge · Answered somebody for the first time. · Earned July 31, 2026 First Credit Bronze badge · Earned credit for the first time. · Earned July 31, 2026 Welcomed Bronze badge · Reached 10 credit. · Earned July 31, 2026
return leaves the function. break leaves the loop. continue skips to the next iteration. Write those three on a sticky note, it saves a lot of confusion in the first few months.
On Windows also check whether you are typing python, py or python3. The py launcher picks a version by rules you have never configured, and it may well not be the one you think. py -0p lists what it knows about and where each one lives.
The compiler line was the bit I could not evaluate. That helps.