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 trialMike Nunyabeez
4,677 PointsItems not appending to my list
reminder_list = []
print("What do we need to rememeber?")
print("Enter 'DONE' to stop adding items.")
while True:
new_item = input("> ")
if new_item == "DONE":
break
reminder_list.append(new_item)
print("Here's your list:")
for item in reminder_list:
print(item)
When I type 'DONE' nothing is printing in my list.
Mike Nunyabeez
4,677 PointsThanks. I would upvote your answer but you answered as a comment I believe, instead of an answer. Appreciate the fast response!
2 Answers
Gang Liu
519 PointsThank you so much for the Q&A! I have the same issue and got the solution. :-)
Jamal Scott
9,656 PointsJamal Scott
9,656 Pointsits most likely because the append is in the if statement, try bringing it out