Python Introducing Lists Using Lists Continental

Mark Nembhard
Mark Nembhard
464 Points

Sorry. the screen shot was of the preceding question.I need to check for the letter A

How in the continents question do you check for the letter A

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
for continent in continents:

        print("*", continent)

1 Answer

KRIS NIKOLAISEN
PRO
KRIS NIKOLAISEN
Pro Student 47,480 Points

You can use an index to specify individual characters in a word.

word[0] is the first character of word

word[1] is the second character of word

and so on

So for the challenge you can check if the first character == "A" and if so print the bulleted name