Python Introducing Lists Using Lists Continental

Ozaveshe Balogun
Ozaveshe Balogun
4,898 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
186,994 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,898 Points

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

Put an asterisk in the string.