Welcome to the Treehouse Community
Looking to learn something new?
Debasis Nath3,316 Points
again what is wrong in this code?
it"s showing bummer.
def loopy(items): # Code goes here for item in items: print(items) if items="STOP": break
Stuart Wright41,102 Points
There are a couple of things to fix here:
1 - 'items' is the entire list, and 'item' is the current element in list. It is 'item' that you should be checking in your if statement, not 'items'. Same for the print statement - you should only be printing 'item'.
2 - The challenge does not want you to print the 'STOP' item, so the if condition with break statement should come before the print statement, and only if the item is not 'STOP' should it be printed. Also, be careful with your indentation - anything inside an if block should be indented, which you have not done correctly with your break statement in the current code.