Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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 = ['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
221,296 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.