Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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

whats wrong with my code? it is only adding one item in the list

make a list to hold on to our items

shopping_list = []

print out insturctions on How to use use the app

print("what should we pick at the store?") print("Enter 'DONE' to stop adding things")

while True: #ask for new items new_item = input("> ")

if new_item == 'DONE': break

#add new items to our list shopping_list.append(new_item)

# be able to quit the app # print out the list print("here is your list")

for item in shopping_list: print(item)

Marcus Yow
Marcus Yow
12,929 Points

Well I just ran your code and it worked. Just check to make sure you don't have any syntax errors and that your code is properly indented.

1 Answer

I ran it and it work no errors. It should give you error if you can post that it would help.