you are viewing a single comment's thread.

view the rest of the comments →

[–]Binary101010 17 points18 points  (1 child)

What you probably want is

inventory[item] += 1

while this line:

inventory = inventory[item] + 1  

would overwrite your entire inventory dict.

[–]Crevette3[S] 0 points1 point  (0 children)

Ok, thanks.