Welcome to the Treehouse Community
Looking to learn something new?
Jonathan M. Stomber1,702 Points
Oops, I forgot that I need to break out of the loop when the current item is the string "STOP". Help me add that code!
I've looked at every suggestion, still no success. Please help!
def loopy(items) for item in items: if item == "STOP": break else: print(word)
You are forgetting a : to start your code block at the start of the function, line indentation on line 4 and 6 are off and print(word) won't print anything it should be your item variable.
def loopy(items): for item in items: if item == "STOP": break else: print(item)