Python Introducing Lists Using Lists Continental

Benedict Ojuolape
Benedict Ojuolape
1,482 Points

I'd like you to now only print continents that begin with the letter "A".

I'd like you to now only print continents that begin with the letter "A".

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

if continent[0] == "A" 
    print("* " continent)

2 Answers

Benedict Ojuolape
Benedict Ojuolape
1,482 Points

if continent[0] == "A" print("* " continent)

KRIS NIKOLAISEN
KRIS NIKOLAISEN
54,192 Points

You have the condition for printing those that begin with letter A but you aren't looping through the continents. Do as you did in task 1.