what am i doing wrong?
im supposed to write a code that outputs countries starting with A
continents = [ 'Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia', ] for continent in continents: print("* " + continent) for letter in continent: if letter == "A": print(continent)
Take a look at where you put your print statement, what happens if you put it somewhere else in your code?
Kiran Kumar5,044 Points
Goal: To print continents that start with letter 'A'
for continent in continents: if continent.lower() == 'a': # You could choose the letters by position number in the string print(continent)