Reference group
>List Methods
Common ways to add, find, remove, and arrange items in a list. 11 entries.
append()list.append(item)Add a single item to the end of the list.clear()list.clear()Remove all items from the list.copy()list.copy()Make a shallow copy of a list.count()list.count(value)Count the number of times a value appears in the list.extend()list.extend(iterable)Append elements from an iterable to the end of the list.index()list.index(value, start=0, stop=len(list))Return the zero-based index of the first occurrence of a value.insert()list.insert(index, item)Insert an item at a specified index.pop()list.pop(index=-1)Remove and return the item at the specified index.remove()list.remove(value)Remove the first matching value from the list.reverse()list.reverse()Reverse the elements of the list in place.sort()list.sort(key=None, reverse=False)Sort the elements of the list in ascending or custom order.
Looking for something else?
All reference groups