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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Rex Orioko](https://secure.gravatar.com/avatar/f0e660eed531cec3e4daf066064b9e61?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Rex Orioko
3,234 PointsPlease tell me whats wrong with this python code
make a list
shopping_list = []
print instructions how to use app
print("what should we pick up at store") print("Enter 'DONE' to stop adding items")
while True: # ask for new items new_item = input("> ")
# quit app
if new_item == "DONE":
break
# add new items to list
shopping_list.append(new_item)
print out app
print("Here's your list:")
for item in shopping_list: print(item)
![Stuart Wright](https://uploads.teamtreehouse.com/production/profile-photos/6368232/micro_footgolf.jpg)
Stuart Wright
41,118 PointsCan you post your entire script inside the code markup tags please? It's difficult to tell what's happening with the current formatting, and it makes it impossible tell if the indentation is all correct.
![Krishna Pratap Chouhan](https://secure.gravatar.com/avatar/8c46996a3e9af1329e084ea8434377ea?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Krishna Pratap Chouhan
15,203 Pointsi dont know if i am wrong, but did you gave input as 'bread' or just bread.
Not sure but could you please try both, as i can't see any problem in the code.
2 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,274 PointsThis code seems to work.
But I had to make many assumptions about indentation, and I don't know if it was intended to accomplish any particular goal (such as in a code challenge). If the latter, please post a link the course page you were working with.
And always when posting code, usethe instructions for code formatting in the Markdown Cheatsheet pop-up below the "Add an Answer" area.
![Rex Orioko](https://secure.gravatar.com/avatar/f0e660eed531cec3e4daf066064b9e61?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Rex Orioko
3,234 PointsI was running on my local machine and was defaulted to python 2.7, i ha to change input to raw_input
Rex Orioko
3,234 PointsRex Orioko
3,234 PointsI keep getting this when i run code: Traceback (most recent call last): File "/Users/rexorioko/Desktop/functions.py", line 12, in <module> new_item = input("> ") File "<string>", line 1, in <module> NameError: name 'bread' is not defined