promptdojo_

Claude wrote a Player class with an inventory = [] at the class level. Two players share the same inventory list. The output is ['sword', 'shield'] ['sword', 'shield'] instead of ['sword'] ['shield'].

Move the list into __init__ so each player gets its own. After the fix the output should be:

['sword'] ['shield']
The break is on line 2 — 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.

open this same url on a laptop to keep going today.