Python Python Basics (2015) Shopping List App Continue

I'm stuck :(

How do I say I only want to find "a" in the first letter (0).

breaks.py
def loopy(items):
    for item in items:
        if item == "a" in [0]:
            break

1 Answer

You are close: def loopy(items): for item in items: if item[0] == 'a': continue print(item)

Jari Koopman
Jari Koopman
Python Web Development Techdegree Graduate 29,349 Points
def loopy(items):
    for item in items:
        if item[0] == 'a':
            continue
        print(item)

(Just putting this here since it's a bit easier to read)