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.

Zachary Parke
2,796 Pointsbreaks.py
I have my code attached. I went back to take a look at "Around and Around" to see if I could figure this out. Now I feel like I'm just typing too much out. I'm sad I couldn't figure this one out. Seemed like a simple concept.
def loopy(items):
while True:
new_item = input(">")
if new_item == "STOP":
break
items.append(new_item)
for item in items:
print(item)
items = []
2 Answers

Jeff Muday
Treehouse Moderator 27,547 PointsYou are very close! I indented the code that runs in the "while True" infinite loop. And add a call to your function with the empty list.
Have fun with Python, it's an amazing language!
def loopy(items):
while True:
new_item = input(">")
if new_item == "STOP":
break
items.append(new_item)
for item in items:
print(item)
items = []
loopy(items) # and here is where you "call" the function

Zachary Parke
2,796 PointsThanks Jeff. I realized that I actually needed much less code to answer this challenge, but I'm very glad that my code wasn't completely off base. I was just trying to do a little more.
Thanks again.