Python Introducing Lists Using Lists Continental

Mark Nembhard
Mark Nembhard
649 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 = [
    'South America',
    'North America',
for continent in continents:

        print("*", continent)

1 Answer

52,869 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