Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Introducing Lists Using Lists Continental

Mark Nembhard
Mark Nembhard
1,387 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

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