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 trialDirga Gurung
2,730 Pointswhat is wrong on this code i got result look like same?
continents = [ 'Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia', ] for object in continents[0:1:]: print('* '"" +object) for object in continents[1:2:]: print('* '"" +object)
continents = [
'Asia',
'South America',
'North America',
'Africa',
'Europe',
'Antarctica',
'Australia',
]
for object in continents[0:1:]:
print('* '"" +object)
for object in continents[1:2:]:
print('* '"" +object)
1 Answer
Ben Hedgepeth
Python Web Development Techdegree Student 10,287 PointsThe challenge is asking you to create a bullet point for each continent in the list.
Your for loops are iterating over a slice of the continents list. You need to iterate over the entire list with one for loop. With your print() statement you also have excessive quotes.
Dirga Gurung
2,730 PointsDirga Gurung
2,730 PointsThak you so much I dinβt understand question,I was trying to print * Asia * South America