List methods Flashcards
1
Q
append()
A
add single element to the list
2
Q
extend()
A
add elements of a list to another list
3
Q
insert()
A
inserts element to the list
4
Q
remove()
A
removes element from the list
5
Q
index()
A
returns smallest index of element in list
6
Q
count()
A
returns occurrences of element in a list
7
Q
pop()
A
removes element at given index
8
Q
reverse()
A
reverses a list
9
Q
sort()
A
sorts elements of a list
10
Q
copy()
A
returns shallow copy of a list
11
Q
clear()
A
removes all items from the list
12
Q
any()
A
checks if any element of an iterable is true
13
Q
all()
A
returns true when all elements in iterable is true
14
Q
ascii()
A
returns string containing printable representation
15
Q
bool()
A
converts a value to boolean