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

horus93
horus93
4,333 Points

Unintentionally altering the continents list?

Getting this error when I try to print out a bulleted list of continents, though I'm not sure how I'm altering the continents list with it, aside from maybe adding the bullet? But it asked for that, maybe I'm going about the bulleting the wrong way?

"Traceback (most recent call last): File "", line 40, in test_code_untouched AssertionError: 7 != 9 : Please don't alter the continents list"

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

2 Answers

You want to loop through each continent(singular) in the list continents(plural) and do something to each individual item, so inside the loop: continent (singular again).

horus93
horus93
4,333 Points

Thanks, yea I forgot all about using a variable to loop through the list contents singularly, been too sporadic with my coding practice lately that things are starting to fog up. Back to work!