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

Eric Escobar
Eric Escobar
1,017 Points

Where is my mistake? Should I be using the 1st task's code or using a 4th line of code? Am I printing incorrectly?

Tried using singular and plural "continent" wording. Tried using 4th line of code. Def think I'm printing incorrectly. But what's my mistake?

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

1 Answer

Steven Parker
Steven Parker
231,248 Points

You can't index more than one item at a time.

For the final task, you can add an "if" statement between the loop and the "print" to control which items get printed.