Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Introducing Lists Using Lists Continental

How can this be corrected?

I have been struggling on how to solve the problem if anyone could explain this step by step it would be aprreciated

continents = ['Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia']
# Your code here
for continent in continents:

1 Answer

You have the right idea, but they are asking for a BULLETED list of the continents. Your code currently prints all of the continents right next to each other, so you just need to format your print statement. Remember: to move to the next line you can use \n within the print statement. I hope this helps.

Yes but the thing is I think it only wants me to output asia and south America by using the iteration won't it loop through every item in the list when it only wants to output the first 2 items?

They are asking for ALL of the items formatted in a BULLETED list (sorry I am not yelling just using caps to highlight important parts). The only reason you are seeing two in the example is because it is just that... an example of what the output should look like. The final output will be a bulleted list of all of the continents in the list 'continents'.