English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
Python has many list methods that allow us to use lists. On this reference page, you will find all list methods for using Python lists. For example, if you want to add an item to the end of the list, you can use the list.append() method.
Method | Description |
---|---|
append() | Add an element at the end of the list |
clear() | Delete all elements in 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 list |
Note: Python does not have built-in support for arrays, but Python lists can be used.
In Python list tutorial Learn more about lists in Python.
In Python array tutorial Learn more about arrays in Python.