List methods Flashcards

1
Q

append()

A

add single element to the list

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

extend()

A

add elements of a list to another list

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

insert()

A

inserts element to the list

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

remove()

A

removes element from the list

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

index()

A

returns smallest index of element in list

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

count()

A

returns occurrences of element in a list

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

pop()

A

removes element at given index

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

reverse()

A

reverses a list

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

sort()

A

sorts elements of a list

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

copy()

A

returns shallow copy of a list

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

clear()

A

removes all items from the list

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

any()

A

checks if any element of an iterable is true

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

all()

A

returns true when all elements in iterable is true

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

ascii()

A

returns string containing printable representation

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

bool()

A

converts a value to boolean

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

enumerate

A

returns an enumerate object

17
Q

filter()

A

constructs iterator from elements which are true

18
Q

iter()

A

returns iterator for an object

19
Q

list() function

A

creates list in python

20
Q

len()

A

returns length of an object

21
Q

max()

A

returns largest element

22
Q

min()

A

returns smallest element

23
Q

map()

A

applies function and returns a list

24
Q

reversed()

A

returns reversed iterator of a sequence

25
Q

slice()

A

creates a slice object specified by range()

26
Q

sorted()

A

returns sorted list from a given iterable

27
Q

sum()

A

add items of an iterable

28
Q

zip()

A

returns an iterator of tuples