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

Greg Isaacson
PLUS
Greg Isaacson
Courses Plus Student 702 Points

Im lost...

Ok im not sure how to do this question even if it was in plain english!

I need to skip and string that starts with the letter "a".

How do I do this??

I know my index commands, length commands...how do I do this?

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

1 Answer

Greg,

You are so close. Make sure you are checking if the item starts with 'a', not if the item itself is equal to just 'a'. You are currently saying:

if item == 'a':
    continue

So if my list is this ['Kenneth', 'Love', 'is', 'a', 'actual', 'ninja'] only the fourth item is equal to 'a'. but the fifth item starts with an 'a'.

I don't know if that makes sense after I just typed it...

How about this:

Make sure you are checking if the word/item in the list of words/items starts with 'a'. If it does then continue; otherwise, print the word/item.