The Python Papers

The Python Papers

Python Pop Quiz - List Popping

Mike Driscoll's avatar
Mike Driscoll
Mar 26, 2026
∙ Paid

The Python list data type is much like an array in other programming languages. The list includes many different methods. You can get a full listing of those methods like this:

my_list = []
print(dir(my_list))

One of those methods is called pop(). You can pass an index of the item you want to pop from the list (if you don’t, the last item is chosen). That…

User's avatar

Continue reading this post for free, courtesy of Mike Driscoll.

Or purchase a paid subscription.
© 2026 Mike Driscoll · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture