Python Python Basics (2015) Shopping List App Continue

My loopy function needs to skip an item this time, though

Same idea as the last one. My loopy function needs to skip an item this time, though.

Loop through each item in items again. If the character at index 0 of the current item is the letter "a", continue to the next one. Otherwise, print out the current member.

Example: ["abc", "xyz"] will just print "xyz".

Can you tell me where am I wrong?

breaks.py
def loopy(items):
    for item in items:
        if item[0] == 'a'
            continue
        elif:
            print(item)

2 Answers

Also I just realized you are using continue. It should not be used in this case. The body of your for loop should only have 1 statement like:

if item[0] != 'a':
    print(item)

You would only use elif if you were testing an additional condition. Since you are not, you should replace it with else.

Okay, thanks for letting me know. Anyways, that's not actually solving my problem.