Python List Methods

Python has a lot of list methods that allow us to work with lists. In this reference page, you will find all the list methods to work with Python lists. For example, if you want to add a single item to the end of the list, you can use the list.append() method.

Python List append()

Add a single element to the end of the list

Python List extend()

adds iterable elements to the end of the list

Python List insert()

insert an element to the list

Python List remove()

Removes item from the list

Python List index()

returns the index of the element in the list

Python List count()

returns count of the element in the list

Python List pop()

Removes element at the given index

Python List reverse()

reverses the list

Python List sort()

sorts elements of a list

Python List copy()

returns a shallow copy of the list

Python List clear()

Removes all Items from the List

Python any() function

Checks if any Element of an Iterable is True

Python all()

returns true when all elements in iterable is true

Python ascii()

Returns String Containing Printable Representation

Python bool()

Converts a Value to Boolean

Python enumerate()

Returns an Enumerate Object

Python filter()

constructs iterator from elements which are true

Python iter()

returns an iterator

Python list()

creates a list in Python

Python len()

Returns Length of an Object

Python max()

returns the largest item

Python min()

returns the smallest value

Python map()

Applies Function and Returns a List

Python reversed()

returns the reversed iterator of a sequence

Python slice()

returns a slice object

Python sorted() function

returns a sorted list from the given iterable

Python sum()

Adds items of an Iterable

Python zip()

Returns an iterator of tuples