Python lijst/arrays methoden
- Previous Page Python String Methods
- Next Page Python Dictionary Methods
Python heeft een set van ingebouwde methoden die gebruikt kunnen worden op lijsten/arrays.
Methode | Beschrijving |
---|---|
append() | Een element toevoegen aan het einde van de lijst |
clear() | 删除列表中的所有元素 |
Delete all elements from the list | copy() |
Return a copy of the list | count() |
Return the number of elements with the specified value | extend() |
Add list elements (or any iterable elements) to the end of the current list | index() |
Return the index of the first element with the specified value | insert() |
Add an element at the specified position | pop() |
Delete the element at the specified position | remove() |
Delete the item with the specified value | reverse() |
Reverse the order of the list | sort() |
Sort the listNote:
Learn more about lists in Python does not have built-in support for arrays, but can use Python lists. Python Lists Tutorial
Learn more about lists in Python Arrays Tutorial Learn more about arrays in
- Previous Page Python String Methods
- Next Page Python Dictionary Methods