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 Break

Suleiman Abdurozikov
Suleiman Abdurozikov
2,943 Points

I need a help

heeeelp

breaks.py
def loopy(items):
    for item in items:
        print(item)
while True:    
    if item == "STOP"
    break

2 Answers

Jacob Herrington
Jacob Herrington
15,835 Points

Hey again Suleiman -- you've got the same error here as before. If it were me, I would rewatch the videos for these challenges. Here are a few things to look at:

  1. You don't need a while loop here, you have a for ... in loop, just like your last question.
  2. Your If/Else statement needs to happen inside of your for ... in loop.
  3. You need to break out of it only IF something happens

Let me know if you can't figure this one out.