Python List Methods Flashcards
1
Q
append()
A
adds an element to 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 element with the specified values
5
Q
extend()
A
Add the elements of a list(or any iterable), to the end of the current list
6
Q
index()
A
Return the index of the first element at the specified position
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 item with the specified value
10
Q
reverse()
A
Reverses the order of the list
11
Q
sort()
A
Sorts the list
12
Q
Joining lists
A
[‘a’, ‘b’] + [‘c’, ‘d’]