It's Dangerous to go alone! Take This!


inventory = {
'gold' : 500,
'pouch' : ['flint', 'twine', 'gemstone'], # Assigned a new list to 'pouch' key
'backpack' : ['xylophone','dagger', 'bedroll','bread loaf']
'pocket' : ['seashell', 'strange berry', 'lint']

Adding a key 'burlap bag' and assigning a list to it

inventory['burlap bag'] = ['apple', 'small ruby', 'three-toed sloth', 'pocket']

Sorting the list found under the key 'pouch'

inventory['gold'] = inventory['gold'] + 50

It say on the console
File "python", line 5
'pocket' : ['seashell', 'strange berry', 'lint']
SyntaxError: invalid syntax


Where the carat (^) appears will be just after the error that threw the exception. Look to the previous line for the improper syntax.

See it, yet?