11
In Python, how can you copy the elements of one list into another?
Answer & Solution
Answer: Option
A
12
What is the purpose of the clear() method for lists?
Answer & Solution
Answer: Option
A
13
In Python, how can you find the index of a specific element in a list?
Answer & Solution
Answer: Option
A
14
What will be the output of the following code:
my_list = [3, 1, 2]
my_list.sort()
print(my_list)
Answer & Solution
Answer: Option
A
15
In Python, how can you extend a list by adding elements from another iterable?
Answer & Solution
Answer: Option
A
16
What is the output of the following code:
my_list = [1, 2, 3]
my_list.insert(1, 4)
print(my_list)
Answer & Solution
Answer: Option
B
17
Which method is used to remove the first occurrence of a specific element in a list?
Answer & Solution
Answer: Option
A
18
What is the purpose of the count() method for lists?
Answer & Solution
Answer: Option
A
19
In Python, how can you join two or more lists together?
Answer & Solution
Answer: Option
A
20
In Python, how can you remove all occurrences of a specific element from a list?
Answer & Solution
Answer: Option
A