Python Introducing Lists Using Lists Continental

abhishek krishna vandadi
abhishek krishna vandadi
878 Points

Could someone help me with the code of "I'd like you to now only print continents that begin with the letter "A"?

It is challenge task 2 out of 2 in introduction to lists

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
# Your code here
for i in continents:
    print(i[0],i[3],i[5],i[6])
bot .net
bot .net
10,072 Points

Hi!, u just need to check if the first letter in each of the words in the array contains the letter "A" and u do it like this:

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

if it helped mark as best answer in ordet to close this theard