Python Introducing Lists Using Lists Continental

Ozaveshe Balogun
Ozaveshe Balogun
1,015 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
176,675 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
1,015 Points

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

Steven Parker
Steven Parker
176,675 Points

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

Ar33ss Leon
Ar33ss Leon
4,620 Points

Put an asterisk in the string.