Challenge question help
Can someone please tell me why this code isn't working for this challenge?
continents = [ 'Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia', ] # Your code here for continent in continents: print('* ' + continent) for continent in continents: if continent == "A": print(continent)
Louise St. Germain19,368 Points
You're very close! For the second part of the challenge you'll need to update the code you had for the first part of the challenge, instead of creating a second for loop. It's asking to only see only a single list containing the continents that start with "A", but the way your code is above, it lists all the continents (still), and then outputs a second list with the A-continents.
Also, in the output for the A-continents, you don't have the "* " bullet points that it's expecting.
So basically you just need to set the print statement on the last line to include the "* " (exactly like you did it for part 1 of the challenge), and then get rid of your first for loop entirely, so that it only prints out the A-continents.
Once you do that, everything should be working for part 2 of the challenge.
I hope this helps!