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

continents.py help: I am not sure what is expected in output. Only Asia and South America?

I have even tried: my_list = continents[0] to just print Asia

I get bummer * Asia is not shown and my output is like this * Asia/n

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

The output is looking for a bulleted list of the continents. I'm not sure what you are trying to do with pop. You are on the right track but I don't think you need to pop anything it only wants you to print each item.

3 Answers

Steven Parker
Steven Parker
231,248 Points

You won't need to "pop" anything in this challenge, as Anthony observed.

And when you fix that, the challenge is expecting only one space between the "bullet" and the name, so if you use two arguments you can skip the space. Or you can leave the space and use concatenation.

ā€ƒ ā€ƒ "print("*", continent)" ā€ƒ or ā€ƒ "print("* " + continent)"

Agree: Simply can't understand what the error is describing to me below. In the for loop the new lin character seems to be evidnet.

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

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

Steven Parker
Steven Parker
231,248 Points

You still have an extra space. Either remove the space from the string or change the comma into a + (as in the two examples I show above_.

hint* the problem is in the print statement. Look into using a separator to get rid of the \n

I am a bit surprised that this formatting was required in the exercise. I did not remember covering this in the video.

for continent in continents: print ("* ", continent, sep ="")