Python Introducing Lists Using Lists Continental

Farhan Murad
Farhan Murad
1,920 Points


I do not know how to print only Asia and South America from this list. It is supposed to look something like this: "* Asia

  • South America"
continents = [
    'South America',
    'North America',
# Your code here

1 Answer

Jeff Muday
Jeff Muday
Treehouse Moderator 23,719 Points

You are close! Python pop() method works only on one element at at time.

documentation here:

One way to do this is below. However, continents is altered and will no longer have the first two elements of the list after you run the code.

Since pop(0) removes the FIRST element of the list, you call it twice.


A non-deleting method to acheive the task is below:


Good luck with your Python journey, there are a lot of cool apps waiting for you to build!