Python List Methods Flashcards
1
Q
append()
A
Adds an element at the end of the list
2
Q
clear()
A
Removes all the elements from the list
3
Q
copy()
A
Returns a copy of the list
4
Q
count()
A
Returns the number of elements with the specified value
5
Q
extend()
A
Add the elements of a list (or any iterable), to the end of the current list
6
Q
index()
A
Returns the index of the first element with the specified value
7
Q
insert()
A
Adds an element at the specified position
8
Q
pop()
A
Removes the element at the specified position
9
Q
remove()
A
Removes the first item with the specified value
10
Q
reverse()
A
Reverses the order of the list
11
Q
sort()
A
Sorts the list