Adds a single element to the end of a list, modifying it in-place
Reference
List Methods
Methods available on Python list objects.
- list.append()
- list.clear()
Removes all elements from a list, making it empty in-place
- list.copy()
Creates a shallow copy of a list
- list.count()
Returns the number of times a specified value appears in a list
- list.extend()
Adds all elements from an iterable to the end of a list, modifying it in-place
- list.index()
Returns the index of the first occurrence of a specified value in a list
- list.insert()
Inserts an element at a specified position in a list, modifying it in-place
- list.pop()
Removes and returns the element at the specified index in a list
- list.remove()
Removes the first occurrence of a specified value from a list
- list.reverse()
Reverses the elements of a list in-place, modifying the original list
- list.sort()
Sorts the elements of a list in-place, modifying the original list with optional key and reverse parameters