Python Python Basics (2015) Shopping List App Shopping List Introduction

steven breidenstein
steven breidenstein
2,094 Points


treehouse:~/workspace$ python
What should we pick up at the store?
Enter 'DONE' to stop adding items.

Traceback (most recent call last):
File "", line 13, in <module>
AttributeError: 'dict' object has no attribute 'append'
my code looks identical to the one in the video so i don't know whats going on

1 Answer

Chris Freeman
Chris Freeman
Treehouse Moderator 56,833 Points

Did you accidentally define shopping_list as a dict:

# define it as a list using square brackets
shopping_list = []
# define it as a dict using curly brackets or braces
shopping_list = {}