Mark Nembhard649 Points
How do you find the letter A in a string in a list?
It is the question on only printing the continents that starts with A
continents = [ 'Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia', ] for continent in continents: If continent == "A": print("*", continent)
Josh Keenan17,385 Points
Firstly, you need to be careful with casing.
for continent in continents: If continent == "A": print("*", continent)
That is not going to be read as the reserved word "if" but as something else entirely.
For the first part of the challenge you only need a for loop to iterate over the array and output them all bulletpointed like this:
for continent in continents: print("*", continent)
But for part two you aren't looking to see if the value itself is the string "A" but if the string starts with "A", remember you can access the first character of a string like a list with indexing, hope this helps!