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

Daron Anderson
Daron Anderson
2,567 Points

Still looking for a solution made some progress over the last few hours. psh Im not giving up :)

Im looking for the solution within the video, if it is in the video its just hard for me to grasp which is why I am asking for help/solution. Thank you!

continents = [
    'South America',
    'North America',
# Your code here
for continent in continents:
    print ("* " + continent)
continents += continent
for A in continents[0]:
    print (continent)

3 Answers

Ahh, ok. Now i get it. Now i can see your thought process so i can give you some clues that will help.

so if you use your code that i mentioned above it should pass the first test. Then all you will need to do is add some conditional checking to it so it only prints out the ones that start with 'A' (remember to keep the * in front of the print out or it will fail you). so you would keep the 'for loop' and then check each item. Something like: If item[0] is equal to 'A' then print ' * ' + item. I hope this helps, im not sure how else to explain it without actually giving you the answer. Good luck, you got this!

Hello Daron Anderson, it seems like you already have the correct answer. There is no need for all the code you have after your first print statement. The below snippet from your code will pass the challenge. good luck.

for continent in continents:
    print ("* " + continent) 
Daron Anderson
Daron Anderson
2,567 Points

speeddemon I actually meant for the 2nd part which is asking to print only the continents that start with A, my bad lol.