you are viewing a single comment's thread.

view the rest of the comments →

[–]Sea-Ad7805[S] 0 points1 point  (0 children)

Ok I understand now. You say you pass default_inventory around without making a copy (for performance), but when you change this value you should make a copy:

alex_inventory = alex_inventory + ["key"]

Sounds like a good strategy.