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

Shadow Skillz
Shadow Skillz
3,020 Points

Key word Done won't work to print the list

shopping_list = []

print("What should we pick up from the store?") print("Enter 'Done' to stop adding items.")

while True: new_item = ("> ") if new_item == 'Done' : break

shopping_list.append(new_item)

print('here is your list:')

for item in shopping_list: print(item)

3 Answers

Aaron Emery
Aaron Emery
482 Points

You forgot to put input in from of ("> "). Third line should look like this: while True: new_item = input("> ") if new_item == 'Done' : break

I think it should work like that

Zachary Kaufman
Zachary Kaufman
1,463 Points

If I am not mistaken, all user inputs have .lower done to them, so the keyword needs to be 'done' I hope this helps

Shadow Skillz
Shadow Skillz
3,020 Points

Thanks for the timely response but it still not working and even in the video it was capped but the crazy part is i did the program before and it worked but for some reason now its not its just excepting as a regular item I'm thinking something is wrong with my idle

Zachary Kaufman
Zachary Kaufman
1,463 Points

I think you meant ide at the end, if you don't mind me asking, what IDE do you use? (Also sorry my answer wasn't able to help you)