14/14 what's wrong?



Line 15 should be:



But it says ,
File "python", line 15, in
AttributeError: 'dict' object has no attribute 'sort'



Double check your code, look at line 14, compare it to line 8. Notice a difference?

If you still need help after this hint ask again.


I see.....Thanks a lot ! > <


hi betaninja85731

I think by now you might be out with the solution by working out with the wrong code.
In case you have not i would like to help you a bit as your fellow mate,This could help our fellow coders for sure.

correct code snippet

never write the code as below as question mentioned notifies a different format as mentioned above but normally below code is also correct.


This Worked

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'


Your code here

inventory["pocket"] = ["seashell","strange berry","lint"]
inventory["gold"] +=50