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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Sundas Arshad](https://secure.gravatar.com/avatar/0d7d96f90061b90c0765a9a8db50c049?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Sundas Arshad
460 PointsWhy am I keep getting error that south america is in my output list, when I am indexing 0,3,5,6.
South America is at index 2
continents = [
'Asia',
'South America',
'North America',
'Africa',
'Europe',
'Antarctica',
'Australia',
]
# Your code here
print("Continents:")
for continent in continents:
print("*", continent)
print(continents[0])
print(continents[3])
print(continents[5])
print(continents[6])
2 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsYour loop still prints all the continents (including South America) before getting to the added lines.
But what the challenge is actually asking you to do is to continue using the loop, but modify it to check the first letter of each item and decide whether to print it or not based on what it contains.
Hint: You can do this by adding just one line to the code that passed task 1.
![David Garcia](https://uploads.teamtreehouse.com/production/profile-photos/9152182/micro_Screenshot_20200115-232051__01.jpg)
David Garcia
Python Development Techdegree Graduate 11,254 PointsYou are close to figuring this out. All you have to do is get rid of all the print statements out side of the for loop including the one before the for loop. The question wants you to use a for loop that's going through the list of continents all you have to do is add the star symbol before continent in your print statement. in other words you got it right just get rid of the print statements outside the for loop