Python Introducing Lists Using Lists Continental

Iteration

How do i iterate over strings such that i can print items with specific charecter on prefered index e.g in a list with names and i siblly want to print those that beginn with "A".

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
# Your code here
for  continent in continents:
    print("* " + continent)

1 Answer

you need to use a condition, and check if the first index of the iterated word is equal to zero