Python Introducing Lists Using Lists Continental

I'd like you to now only print continents that begin with the letter "A".

im stuck please help

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
for continent in continents :
    if continent [0] == "A":
        print("* "+ (continents[0]))

1 Answer

Steven Parker
Steven Parker
182,590 Points

You're close, but "continents[0]" will always be the first country in the list. What you want to print is the "continent" that you just determined starts with an "A".

you're the best Steve, I got it