Python Introducing Lists Using Lists Continental

Guys i'm stuck :( need help

Guys i'm stuck :( need help

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

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

1 Answer

HIDAYATULLAH ARGHANDABI
HIDAYATULLAH ARGHANDABI
20,981 Points

For the first excercise it shall work but for the second you need to check if continent[0] == "A": print("* " + continent)

so the code will look like

for continent in continents:
    if continent[0] == "A": 
            print("* " + continent)

Thank you sir, It works :)