Its dangerous to go alone! help


#1



inventory = {
'gold' : 500,
'pouch' : ['flint', 'twine', 'gemstone']
'backpack' : ['xylophone', 'dagger', 'bedroll', 'bread loaf']
'pocket' : ['seashell', 'strange berry', 'lint']
}

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

inventory['pouch'].sort()
inventory['backpack'].sort()
inventory['backpack'].remove("dagger")
inventory['gold'] += 50;


It says Did you accidentally delete the inventory dictionary? Click Reset Code to get back to the original code. and in the box to the left it says error on line 4.

im confused.

Replace this line with your code.


#2

Hi, @abuttuba ,

Key-value pairs in a dict need to be separated from each other by commas. Check the initial assignment to inventory.

Here's the first key-value pair that you have, which has a comma at the end of the line ...

'gold' : 500,

Are the others separated from each other correctly?


#3

I got it, thank you so much...
Think I just needed to take a break and look back it at!


#4