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

Print a bulleted list of each continent from the continents list. Output should look similar to:

how do l solve this

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
# Your code here
 print("* " + continent) 
    print("*", continent)

2 Answers

Darryl Mah
Darryl Mah
5,492 Points

You’ll want to loop through the continents array. :) the system is also very precise on making sure the string matches with spaces and capitalization.

The code should look something like:

for continent in continents: print(“* “ + continent)

If you want to be fancy, shorten your code a little, you can use string interpolation.

thanks

i did it like this but i am getting an AssertionError.....Its saying "not finding the correct items in your output......what am i doing wrong?

for continent in continents: print("*" + continent)