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

Cant get past Bulleted lists question

I'm on the Bulleted lists question. I cannot get past it. here is the code I'm using for my answer:

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

continents.py
continents = [
    'Asia',
    'South America',
    'North America',
    'Africa',
    'Europe',
    'Antarctica',
    'Australia',
]
for continent in continents: print("*" + continent)

6 Answers

Antonio De Rose
Antonio De Rose
20,885 Points
//ok, leave out the part of [0:2]
//you dont have to restrict to print only the first 2
//think of printing them all

* Asia 
* South America
* North America
* Africa
* Europe
* Antarctica
* Australia

//now could you please try
for continent in continents: print( " * "  + continent)
the above will give the answer correct
//but I'd suggest you take off the preceding space and put it like
for continent in continents: print( "* "  + continent)
Antonio De Rose
Antonio De Rose
20,885 Points

have you been asked to print

* Asia
* South America

or 

*Asia
*South America

Print a bulleted list of each continent from the continents list.

Output should look similar to:

* Asia 
* South America 
Antonio De Rose
Antonio De Rose
20,885 Points

yes, so your one is giving an output like

*Asia
*South America

# can you tailor your code for the output to look like
* Asia 
* South America

Heres what I got:

for continent in continents[0:2]: print( " * "  + continent)

and here is the error:

Bummer: AssertionError: '* Asia' not found in '*Asia\n *South America\n *North America\n *Africa\n *Europe\n *Antarctica\n *Australia' : Hmm...not finding the correct items in your output

OK got it finally!