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

Can any one please assist, i'm close but not close enough. Thanks.

Any one please.

breaks.py
def loopy(items):
    items = []
    for loo in items:
        if loo[0]=="a":
            continue
    print (loo)
        # Code goes here

1 Answer

Stuart Wright
Stuart Wright
41,120 Points

There are three things to fix here:

  • you need to delete your "items = []" line. This has the effect of setting items equal to an empty list, rather than the list which will be passed in to the function.
  • you need to remove the space between print and (loo).
  • the same line - print(loo) - needs to be indented further so that it is inside the for loop.

Thank you so much Stuart, great to have you as a colleague.