There is a hint for Remove a Few Things(Python Lists and Dictionaries):
You can use list functions with a list stored in a dictionary as follows: dict_name['list_key'].list_function() This should help you delete 'dagger' from the list of items stored under the 'backpack' key.
I've tried this:
backpack = ['xylophone', 'dagger', 'tent', 'bread loaf'] backpack['dagger'].list_function()
,but it doesn't work, showing an error:
Traceback (most recent call last): File "python", line 2, in <module> TypeError: list indices must be integers, not str
Could someone explain me how should dict_name['list_key'].list_function() work, please?