Python Introducing Lists Using Lists Continental

christopher gustave
christopher gustave
Python Web Development Techdegree Student 973 Points

Having issues with: I'd like you to now only print continents that begin with the letter "A". how can i list them?

syntax comes back with an error. i tried every way that i know of. i need to list all continents with an "A" , im sure there are multiple ways to this but cant find the solution
continents = [
    'South America',
    'North America',
# Your code here
for continent in continents:
    print(continents[0] + [3] + [5] + [6])

2 Answers

Damien K. Sedgwick
Damien K. Sedgwick
23,887 Points

Here is how I passed :))

continents = ['Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia']

for continent in continents: 
    if continent[0] == 'A': 
         print(" " + continent)