list methods Flashcards

(9 cards)

1
Q

adds an element at the end of the list

A

.append()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

returns the number of elements with the specified value in the ()

A

.count()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

add the element of a list (or any utterable) to the end of the current list

A

.extend()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

returns the index of the first element with the specified value ()

A

.index()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

adds an element at the specified position

A

.insert()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Removes the element at the specified position

A

.pop()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Removes the first item with the specified value

A

.remove()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

reverses the order of the list

A

.reverse()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

sorts the list

A

.sort()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly