Podcast
Questions and Answers
What is the purpose of the list.append(x)
method?
What is the purpose of the list.append(x)
method?
What does the list.extend(iterable)
method do?
What does the list.extend(iterable)
method do?
What is the purpose of the list.insert(i, x)
method?
What is the purpose of the list.insert(i, x)
method?
What does the list.remove(x)
method do?
What does the list.remove(x)
method do?
Signup and view all the answers
What is the purpose of the list.pop([i])
method?
What is the purpose of the list.pop([i])
method?
Signup and view all the answers
What does the list.count(x)
method do?
What does the list.count(x)
method do?
Signup and view all the answers
What happens when you call list.clear()
on a list?
What happens when you call list.clear()
on a list?
Signup and view all the answers
If my_list = [1, 2, 3, 4, 5]
and you call my_list.index(3)
, what is the output?
If my_list = [1, 2, 3, 4, 5]
and you call my_list.index(3)
, what is the output?
Signup and view all the answers
If my_list = [10, 20, 30, 20, 10]
and you call my_list.count(20)
, what is the output?
If my_list = [10, 20, 30, 20, 10]
and you call my_list.count(20)
, what is the output?
Signup and view all the answers
If my_list = ['apple', 'banana']
and you call my_list.insert(1, 'orange')
, what is the new list?
If my_list = ['apple', 'banana']
and you call my_list.insert(1, 'orange')
, what is the new list?
Signup and view all the answers
What is the result of [1, 2, 3] + [4, 5, 6]
?
What is the result of [1, 2, 3] + [4, 5, 6]
?
Signup and view all the answers
If my_list = [1, 2, 3, 4, 5]
and you call my_list[1:4]
, what is the output?
If my_list = [1, 2, 3, 4, 5]
and you call my_list[1:4]
, what is the output?
Signup and view all the answers