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

Im not sure where I'm going wrong here

I feel that this is simple but what is wrong?

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

2 Answers

I notice two bugs:

  • :warning: You are using concatenation (adding strings together), so the strings will be glued together without spaces.
  • :warning: You are attempting to add the string "*" and continents together. But continents is a list! :/

To fix the bugs, try...

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

Your issue is here in the print method:

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

continents is the list of continents, not the actual continent that has been selected in the for loop. Simply erase the extraneous s at the end like so:

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

and you'll be good to go!

Sorry Shadd, but there's one more bug in his code ;)

(Remember: code challenges are picky about spacing!)

ah, I didn't even realize this was for a code challenge. lol! Whoops