Всем привет. Прохожу курс по Питону на Codecademy. Вот код:
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['pouch'].sort()
# Your code here
inventory['pocket'] = ['seashell', 'strange berry', 'lint']
inventory['backpack'].sort()
inventory['backpack'].remove('dagger')
inventory['gold'].append(50)
Проблема в последней строчке. Вот ошибка:
Traceback (most recent call last):
File "python", line 17, in <module>
AttributeError: 'int' object has no attribute 'append'
А вот что пишет по поводу этой ошибки сам сервис:
Oops, try again. Your code looks a bit off. Check the Hint if you need help! Your code threw the following error: 'int' object has no attribute 'append'
Помогите разобраться.