Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Sean Frye
1,167 PointsI have been trying this for over a half hour
I have been trying this for over half an hour. I have looked through many of the notes I have taken and I have tried entering different commands and different iterations for this loopy function and I just keep getting stuck. It feels like what I have studied isn't helping here or I am missing something and just not understanding it.
def loopy(items):
items = []
print("What do you need?")
print("Enter 'DONE' to stop adding items.")
while True:
new_item = input("> ")
if new_item == 'DONE':
break
items.append(new_item)
print("Here's your list.")
for item in items:
print(item)
1 Answer

Rich Donnellan
25,767 PointsSean,
The challenge is a very simplified version of the previous video. Do exactly as the instructions say; nothing more, nothing less.
Hint: Omit everything between the first line and the start of the for
loop. Then in task 2, you'll do a check with an if
statement.
Sean Frye
1,167 PointsSean Frye
1,167 PointsWow! I just tried what you said and it worked. But the thing that frustrates me is that I could have sworn I already tried that, but apparently I must have left something out. Hm. I wouldn't say it's exactly the same. It seemed different to me, although I am seeing some similarities between the correct answer and the notes I took from the video itself.
Rich Donnellan
25,767 PointsRich Donnellan
25,767 PointsGlad you got it!
Try not to get frustrated. Really. Just be very mindful of what the challenges are asking for. TH requires pretty specific answers and anything extra will cause a bummer, even though it's technically correct.