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)
![Victor Curtis Jr](https://uploads.teamtreehouse.com/production/profile-photos/3052412/micro_IMG_0233.jpg)
Victor Curtis Jr
5,268 PointsHaving Trouble with Printing Items in a List that Only Begin With the Letter "A"
Having trouble trying to figure out how to print out only the continents that begin with the letter "A". I've been researching for a bit and trying different things I've found but at this point I'm kinda just grasping at straws. I hope someone in the community may be able to help or maybe just point me in the right direction.
continents = [
'Asia',
'South America',
'North America',
'Africa',
'Europe',
'Antarctica',
'Australia',
]
for continent in continents:
if (continent[0] = "A"):
print("* " + continent)
4 Answers
![Madushan Perera](https://uploads.teamtreehouse.com/production/profile-photos/11646482/micro_IMG_20200127_204355_902.jpg)
Madushan Perera
7,624 PointsHello Victor, Try this one. I think you need to use the double equation operator "==" in the condition. Hope this helps you :)
continents = [
'Asia',
'South America',
'North America',
'Africa',
'Europe',
'Antarctica',
'Australia',
]
for item in continents:
if (item[0] == "A"):
print("* " + item)
![Kristjan Vingel](https://uploads.teamtreehouse.com/production/profile-photos/10821196/micro_profile-pic__18_.jpg)
Kristjan Vingel
7,992 PointsEverything's OK, you're just missing a small thing. Check out the second example:
https://docs.python.org/3/tutorial/controlflow.html#for-statements
![Kristjan Vingel](https://uploads.teamtreehouse.com/production/profile-photos/10821196/micro_profile-pic__18_.jpg)
Kristjan Vingel
7,992 PointsOr you can also use the "is" keyword.
![Madushan Perera](https://uploads.teamtreehouse.com/production/profile-photos/11646482/micro_IMG_20200127_204355_902.jpg)
Madushan Perera
7,624 PointsYes, We can use "is" keyword too
![Victor Curtis Jr](https://uploads.teamtreehouse.com/production/profile-photos/3052412/micro_IMG_0233.jpg)
Victor Curtis Jr
5,268 PointsThis is the answer. I finally figured it out and passed the challenge.
continents = [
'Asia',
'South America',
'North America',
'Africa',
'Europe',
'Antarctica',
'Australia',
]
for continent in continents:
if (continent[0] == "A"):
print("* " + continent)