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

Need help with the objective.

i dont understand how to skip the item which has the character "a" . i am so confused.

breaks.py
def loopy(items):

    for letter in items:
        if letter == 'a':
            continue
            print(letter)    

2 Answers

Ari Misha
Ari Misha
19,323 Points

Hiya Neal! There are a couple of issues with code. Lets just say, we passed an array and each entry at each index is bunch of words right? The array kinda looks like this: ["abc", "xyz"] And The challenge needs you to skip over if the first entry in the words in an alphabet a. Refactor your code to look like this:

def loopy(items):
    for letter in items:
        if letter[0] == 'a':
            continue
        print(letter)
Brian Boring
PLUS
Brian Boring
Courses Plus Student 3,904 Points

Think of it this way, IF letter is equal to 'a', continue, ELSE:, print.