SyntaxFix
Write A Post
Hire A Developer
Questions
Well you could directly substract from the value by just referencing the key. Which in my opinion is simpler.
>>> books = {} >>> books['book'] = 3 >>> books['book'] -= 1 >>> books {'book': 2}
In your case:
book_shop[ch1] -= 1