Python List Methods
Methods are functions bound to an object (in this case, a list). Call a method using a dot after the object (list), and pass arguments similarly to functions.
Below is a list of all list methods in Python, sorted alphabetically.
append(x)
Adds an element to the end of the list.
clear()
Removes all values from the list.
copy()
Returns a copy of the list.
count(x)
Returns the number of occurrences of a value in the list.
extend(iterable)
Extends the list with elements from the specified iterable object.
index(x[, start[, end]])
Returns the index of the first element with the value x.
insert(i, x)
Inserts the specified element at the specified index in the list.
pop([i])
Returns and removes the element at the specified position.
remove(x)
Removes the specified element from the list.
reverse()
Reverses the elements of the list.
sort(key=None, reverse=False)
Sorts the elements of the list.