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 trialwalter fernandez
4,992 Pointsneed help with list
continents = [ 'Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia', ] i have to print the word that start with "A" i tried this: for i in continents: print(i) but it does not work.
continents = [
'Asia',
'South America',
'North America',
'Africa',
'Europe',
'Antarctica',
'Australia',
]
# Your code here
for i in continents:
print('*',i )
1 Answer
Steven Parker
231,275 PointsI just answered your other question. It looks like you got past task 1 now.
For task 2 you will need to add a conditional statement ("if") before the print, to control when the print runs. The condition should test if the the first letter of the name is an "A". You can access individual letters by indexing (with []'s), and the first index is always 0.
<noob />
17,062 Points<noob />
17,062 PointsHi!, i answered ur question, check ur notification!