Can't sort inventory, keeps getting error!


Hey all! I'm having an issue with this exercise and hoping someone could point me in the right direction?!

The error message keeps asking me "Did you remember to sort the list at inventory ['backpack']?

I thought this what the right syntax?


<do not remove the three backticks below>

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

# 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['pocket'] = ["seashell", "strange berry", "lint"]
print inventory


The lesson checker doesn't have a response to match the above error. You will want to add 50 to the 500 for gold.


Thanks for the help! Error solved.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.