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 trialKevin Selagea
2,161 PointsI need help! Can someone help me please?
It says to try again. I feel like I got it right though
def loopy(items):
for i in items:
if i == 'STOP'
break
else
print(i)
3 Answers
Chris Howell
Python Web Development Techdegree Graduate 49,702 PointsYou are really close! It is a Syntax Error
HINT: you are missing colons(:) in two spots.
NOTE: You wont be able to submit the if/else for part 1, only part 2. So only code what its asking for in each part.
Henrik Christensen
Python Web Development Techdegree Student 38,322 PointsVery close
def loopy(items):
for i in items:
if i == 'STOP': # you forgot a colon here
break
print(i) # remove the else statement
Kevin Selagea
2,161 PointsThank you both! I didn't see that I had syntax errors!