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!
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
Sreejith Unnikrishnan2,407 Points
The solution check seems not be working correctly. When i run the code in python interpreter, it seems to be working
Well the solution asks to iterate through the item list and then to break the loop when it finds "STOP". I believe the code does that, however the grader seems to say incorrect every time, any thoughts?
def loopy(items): ... # Code goes here ... for i in items: ... if i == "STOP": ... break ... else: ... print i ... loopy(["hello", 5, "STOP", "there"]) hello 5
def loopy(items): # Code goes here for i in items: if i == "STOP": break else: print i
def loopy(items): # Code goes here for i in items: if i == "STOP": break else: print(i)
print is a function
Yes! Shades of Swift 1 vs Swift 2