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

2nd challenge objective

Hello guys am currently in the 2nd objective of this challenge. Am asking why can't this let me pass even though that i got the answer right. Here's my code

continents[
"Asia",
"South America",
"North America",
"Africa".
"Europe",
"Antartica",
"Australia"
#Your code here
       for continent in continents:
           if continents[0] == "A":
                print(continent)
]

What am trying to say that in the terminal it'll print out the continents that has "A" as the first letter. But why isn't this working?.

1 Answer

Steven Parker
Steven Parker
231,269 Points

Part of it's probably a typo. You wrote "continents[0]" (plural) instead of "continent[0]" (singular).

But also it looks like the comment, along with your code, got moved inside the list, but it should come after it. And the indentation will also need adjusting once it's in the right place.

Oh, and the instructions also want you to include an asterisk ("bullet") before each name.

Thank you mr parker. That'll do!