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 trialChristian Abreu
3,587 PointsAssertionError: 7 != 9 : Please don't alter the continents list
Hello! I'm not quite sure what is causing this error to occur? Output states the error is on line 40.
continents = [
'Asia',
'South America',
'North America',
'Africa',
'Europe',
'Antarctica',
'Australia',
]
# Your code here
for continents in continents:
print("* " + continents)
1 Answer
Steven Parker
231,271 PointsUsing the same variable for both the source and the loop control causes the original list to be changed by the loop.
Try using a different variable for the loop control. A popular choice is the singular version of the list name.
Christian Abreu
3,587 PointsChristian Abreu
3,587 PointsThank you!!