Python Introducing Lists Using Lists Continental

Shavez Memon
Shavez Memon
Python Development Techdegree Student 2,442 Points

what is wrong here?

Hey, this is my code and I'm getting an error for Task2. I can't figure why. Could you please help?
continents = [
    'South America',
    'North America',
# Your code here
for i in continents:
    print ('* {}'.format(i))

for i in continents:
    if i[0] == 'A':

1 Answer

Steven Parker
Steven Parker
201,913 Points

This is the same issue as you had in the other question.

The conditional test should be added into the loop already there. Don't create a second loop.