Python Introducing Lists Using Lists Continental

Luke Tate
seal-mask
.a{fill-rule:evenodd;}techdegree
Luke Tate
Python Development Techdegree Student 901 Points

I keep getting "Asia" is not part of the list. What and Why I'm getting it wrong?

I've have made a for in loop, to reference the continents list. I've also made a print method within the for in loop such as 'print("*"+continent)'. And even though I'm printing the everything in bullet points as the excersise says, I keep getting this "AssertionError: "Asia" is not found in \n *Asia\n*South America\n*North America", etc. What do I need to do to fix this? Any help would be appreciated.

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
# Your code here

for continent in continents:
    print("*"+continent)

1 Answer

Ave Nurme
Ave Nurme
14,295 Points

Hi Luke

You are missing a space here after the asterisk:

print("*"+continent)

Add the space and you should pass the challenge just fine!

Luke Tate
seal-mask
.a{fill-rule:evenodd;}techdegree
Luke Tate
Python Development Techdegree Student 901 Points

Thanks! Weirdly enough, I was looking at other answers to see if I had the same question asked, and it was the case.