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

Ingrid Matthews
Ingrid Matthews
1,465 Points

Completely stuck on this one

Can someone help me see what's wrong with this answer? Many thanks!

for continent in continents: if continent[0].lower() == "a": print(continent)

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
# Your code here
for continent in continents:
    if continent[0].lower() == "a":
        print(continent)
Francesco Vertemati
Francesco Vertemati
8,223 Points

Hi Ingrid! The test is asking for the first letter to be "A" so you can just write

if continent[0] == "A" :

also the test require the output to be formatted with asterisk and space before the name of the continent exactly like the previous one, so the last line should include "* " before the string continent

Best

1 Answer

Steven Parker
Steven Parker
231,248 Points

You just forgot to prefix the name with a "bullet" (asterisk). Fix that and it will pass.

It's a bit fancier than needed though, since the instructions only ask you to test for "A" (capital). So you can test for it directly and don't need the case conversion.