Python Introducing Lists Using Lists Continental

Benedict Ojuolape
Benedict Ojuolape
Python Web Development Techdegree Student 1,313 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

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 45,971 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.