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 trialEswar Ambati
890 PointsHow 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:
print(continent)
1 Answer
Kirsten Smith
3,484 PointsYou 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.
Eswar Ambati
890 PointsEswar Ambati
890 PointsYes 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?
Kirsten Smith
3,484 PointsKirsten Smith
3,484 PointsThey 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'.