Farhan Murad1,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 = [ 'Asia', 'South America', 'North America', 'Africa', 'Europe', 'Antarctica', 'Australia', ] # Your code here continents.pop(0,1)
Jeff MudayTreehouse Moderator 23,719 Points
You are close! Python pop() method works only on one element at at time.
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!