Welcome to the Treehouse Community
Looking to learn something new?
Daniel Gajdos3,817 Points
"bummer" error for CONTINUE challenge
I tested my code in python console and it's working ok but here i received error "bummer". I am not sure whether I have something wrong or i misunderstood the task. Please could you help me? Thanks in advance.
def loopy(items): # Code goes here for item_index, item_value in enumerate(items): if (item_index == 0) and (item_value == 'a'): continue print(item_value)
Haider AliPython Development Techdegree Graduate 24,724 Points
Hi Daniel, I have taken a look at your code and seen that the challenge is actually a lot more simple than you think.
def loopy(items): for item in items: if item == 'a': continue else: print(item)
Sergey Podgornyy20,660 Points
You should continue if item is the letter "a"
def loopy(items): for item in items: if item != 'a': # <-- reversed test to not 'a' print(item) continue