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 trialFaraz Jahangiri
1,028 PointsHow do I output the continents that begin with the letter A?
This is the code I am using, could someone help me to output the continents that begin with A??
continents = [
'Asia',
'South America',
'North America',
'Africa',
'Europe',
'Antarctica',
'Australia',
]
# Your code here
for continent in continents:
print(continents[0])
1 Answer
Scott Bailey
13,190 PointsAfter your for statement, (indented) you should try using an "if" statement to compare the first letter of the continent (continent[0]) is equal to "A".
See if you can figure it from that, I'm not great at describing these ideas well
If you need any more help let us know!
Faraz Jahangiri
1,028 PointsFaraz Jahangiri
1,028 PointsOk thank you