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

Christian Glaß
Christian Glaß
5,650 Points

Function name ist not definend

Hey my ErrorCode is:

"Bummer! NameError: name 'loopy' is not defined"

there isn't much more to say, hope you can help me. :-)

breaks.py
def loopy(items):
    # Code goes here
    for item in items:
        item2 = item.list()
        if item2.index("a") == 0:
            continue
        print(item)

1 Answer

Justin Horner
STAFF
Justin Horner
Treehouse Guest Teacher

Hello Christian,

You're very close on this one. Something is failing in the method which is causing the error you're seeing. Here's the approach I took. I tested to verify this passes the challenge.

def loopy(items):
    for item in items:
        if item[0] == "a":
            continue
        print(item)

I hope this helps.

Christian Glaß
Christian Glaß
5,650 Points

thank you very much for your fast reply :)

it is easier than I thought :D