Python List Methods Flashcards

1
Q

append()

A

Adds an element at the end of the list

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

clear()

A

Removes all the elements from the list

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

copy()

A

Returns a copy of the list

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

count()

A

Returns the number of elements with the specified value

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

extend()

A

Add the elements of a list (or any iterable), to the end of the current list

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

index()

A

Returns the index of the first element with the specified value

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

insert()

A

Adds an element at the specified position

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

pop()

A

Removes the element at the specified position

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

remove()

A

Removes the first item with the specified value

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

reverse()

A

Reverses the order of the list

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

sort()

A

Sorts the list

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