Python Introducing Lists Using Lists Continental

Ozaveshe Balogun
Ozaveshe Balogun
4,409 Points

code correct but gives error

continents = [ 'Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia', ]

Your code here

print(continents[0])

for name in continents:

if name[0]=="A":
    print(name)

this code works but gives error. I need help please

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
# Your code here
# print(continents[0])
for name in continents:

    if name[0]=="A":
        print(name)

3 Answers

Steven Parker
Steven Parker
182,285 Points

You're close, but the challenge wants your list to include a "bullet" (asterisk) and a space in front of each name.

Add that and you'll pass the challenge.

Ozaveshe Balogun
Ozaveshe Balogun
4,409 Points

oooh........ok. Thanks very much

Steven Parker
Steven Parker
182,285 Points

Ozaveshe Balogun — Glad to help. You can mark a question solved by choosing a "best answer".
And happy coding!

Put an asterisk in the string.