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 trial

Python Python Basics (2015) Shopping List App Continue

Help With The Challenge "Continue"

I'm Working On The Challenge "Continue", and with my code below, I keep getting this error, "Bummer! Didn't Find The Right Items Printed!" But I don't see where my code went wrong.

breaks.py
def loopy(items):
    for item in items:
        if items.index == 0:
            pass
        else:
            print(item)

1 Answer

Dane Parchment
MOD
Dane Parchment
Treehouse Moderator 11,075 Points

The problem with your code is the fact that the python pass statement doesn't actually skip the code, it is just a null statement that does nothing. So your code is still going to print out the 0<sup>th</sup> index.

There is a hint for which statement you are supposed to use in the challenge question itself....I will give you a hint:

continue

I recommend you go back and watch the video before this exercise, as it shows you how to accomplish exactly what you need to do!