14 Python Lists and Dictionaries


#1

Hello, I have been working on this code but I cannot seem to get it to work. An error message appears and says that I accidentally deleted the inventory dictionary. Can anyone please help me out with my code, Thanks.

inventory = {
    'gold' : 500, 50
    'pouch' : ['flint', 'twine', 'gemstone'], # Assigned a new list to 'pouch' key
    'backpack' : ['xylophone','dagger', 'bedroll','bread loaf']
    backpack.sort()
    backpack.remove('dagger')
    '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']

# Sorting the list found under the key 'pouch'
inventory['pouch'].sort() 

# Your code here

#2

These lines should not be inside the dictionary.