Python List Methods

Beginner
5 min read
Updated: Nov 2026
11 method guides
Method index

About This Index

This page is the Python List Methods index for the tutorial track. Each row links to a full guide with syntax, parameters, return value, three runnable examples, and FAQs. Every example uses fixed data, and since a list keeps its items in order, the output you see is the output you get.

Learn indexing, slicing, creating lists, and the classic mistakes on the List hub. Use this page when you need a specific method such as append(), pop(), or sort().

Eleven methods, one type.

Every method below belongs to the built-in list type, so no import is needed. Eight of them change the list in place; of those, only pop() hands something back, and the rest return None. The Returns column tells you which is which.

How to Call a List Method

Write the list, a dot, the method name, and the arguments. Methods that change the list return None, so call them on their own line; pop(), index(), count(), and copy() give you a value to use:

Python
nums = [5, 3, 8]
nums.append(1)           # add one item at the end
nums.insert(0, 9)        # add one item at position 0
print(nums)              # [9, 5, 3, 8, 1]
print(nums.pop())        # 1
print(nums.index(8))     # 3
nums.sort()              # sorts in place, returns None
print(nums)              # [3, 5, 8, 9]
print(nums.count(5))     # 1

Python List Methods Table

All method guides in this Python tutorial series (11 tutorials), grouped by purpose.

Add items

3 methods

Put one item at the end, one item at any position, or every item of another iterable at the end.

MethodReturnsDescriptionTutorial
append()NoneAdd one item to the end of the list, in place.Try it
insert()NoneInsert one item before a given position, shifting later items right.Try it
extend()NoneAdd every item from an iterable to the end of the list, in place.Try it

Remove items

3 methods

Take an item out by position and get it back, delete the first item equal to a value, or empty the whole list in place.

MethodReturnsDescriptionTutorial
pop()removed itemRemove and return the item at a position, the last one by default.Try it
remove()NoneRemove the first item equal to a value.Try it
clear()NoneRemove every item in place, leaving an empty list.Try it

Search and count

2 methods

Find the position of the first matching item, or count how many items are equal to a value.

MethodReturnsDescriptionTutorial
index()int (position)Return the position of the first item equal to a value.Try it
count()intCount how many items are equal to a value.Try it

Order and copy

3 methods

Sort in place with an optional key, flip the order in place, or make a new shallow copy.

MethodReturnsDescriptionTutorial
sort()NoneSort the list in place, with an optional key function and reverse flag.Try it
reverse()NoneReverse the order of the items in place.Try it
copy()new list (shallow)Return a shallow copy: a new list that shares nested objects.Try it

List Operators and Idioms

These are not named methods, but you will use them next to the methods above in almost every program:

CodeWhat it does
lst[i]Item at position i, counting from 0; a negative i counts from the end. Raises IndexError when out of range.
lst[a:b:c]New list from index a up to, but not including, b, taking every c-th item. Out-of-range bounds never raise.
lst[i] = xReplace the item at position i.
del lst[i]Remove the item at i (or a slice, del lst[a:b]) without returning it.
x in lstTrue if any item is equal (==) to x.
len(lst)Number of items.
lst + otherNew list with the items of both; other must also be a list.
lst * nNew list with the items repeated n times; the items themselves are shared, not copied.
lst += iterableExtend in place, exactly like extend(); accepts any iterable, such as a tuple.
sorted(lst)New sorted list; lst.sort() sorts the list itself and returns None.
reversed(lst)Iterator that walks the list backward; lst.reverse() flips the list itself.
lst[::-1]New list in reverse order; the original is unchanged.
Python
a = [10, 20, 30, 40, 50]
print(a[1], a[-1])                  # 20 50
print(a[1:4], a[::2])               # [20, 30, 40] [10, 30, 50]
del a[0]
print(30 in a, len(a))              # True 4
print(a + [60], [0] * 3)            # [20, 30, 40, 50, 60] [0, 0, 0]
print(sorted(a, reverse=True))      # [50, 40, 30, 20]
print(list(reversed(a)) == a[::-1])  # True
a += (70,)                          # same as a.extend((70,))
print(a)                            # [20, 30, 40, 50, 70]

Pick sort() or reverse() when you want to change the list itself, and sorted(), reversed(), or [::-1] when the original must stay as it is. a + [60] needs a list on both sides, while a += (70,) and extend() accept any iterable.

Frequently Asked Questions

They are the functions you call on a list with dot notation, such as tasks.append("x") or scores.sort(). They add, remove, find, count, reorder, or copy items.
This index covers all 11 public list methods: append(), clear(), copy(), count(), extend(), index(), insert(), pop(), remove(), reverse(), and sort().
append(), extend(), insert(), pop(), remove(), clear(), sort(), and reverse() change the list in place. count(), index(), and copy() leave it unchanged.
Methods that change a list in place return None on purpose, so you do not mistake the result for a new list. pop() is the exception: it returns the item it removed.
They are operators and statements, not named methods, but they work on every list and appear in the operators table on this page, next to sorted() and reversed().

Start with append()

Open the first guide in the list and work your way through the list methods.

append() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

16 people found this page helpful