Python Introducing Lists Using Lists Continental

walter fernandez
walter fernandez
1,580 Points

need help with list

continents = [ 'Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia', ] i have to print the word that start with "A" i tried this: for i in continents: print(i) but it does not work.

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

for i in continents:
    print('*',i )
bot .net
bot .net
12,709 Points

Hi!, i answered ur question, check ur notification!

1 Answer

Steven Parker
Steven Parker
170,317 Points

I just answered your other question. It looks like you got past task 1 now.

For task 2 you will need to add a conditional statement ("if") before the print, to control when the print runs. The condition should test if the the first letter of the name is an "A". You can access individual letters by indexing (with []'s), and the first index is always 0.