Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

readme.md

AttributeError: 'dict' object has no attribute 'append'

Occurs when calling append() on a dictionary.

Reproduce

user_scores = {"math": 90}

print(user_scores)
user_scores.append(85)

Error Message

AttributeError: 'dict' object has no attribute 'append'

Fix

user_scores = {"math": 90}

print(user_scores)
user_scores["english"] = 85
print(user_scores)

Reflection

Tried using append() on a dict like a list.