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

How can I choose only A index [0]==true in list?

get struct in test. How to choose only A from index[0] list?

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

1 Answer

Hi. i advice a rewatch to the videos . in order to do that u need to add an if statement below the for loop. u need to iterate each item in the list and check if the first index of the item is A. u do it like so: if continent[0] == “A”: then print