Which of the following functions will be used to insert 8 to the forth position in the list?
a. list.insert(8, 4) b. list.add(4, 8)
c. list.add(8, 4) d. list.insert(4, 8)
What will be the output of the given code?
list=[1, 2, 3, 4, 10]
>>>del list[3]
>>>print(list)
a. [1, 2, 4, 10] b. [1, 2, 3, 10]
c. [1, 2, 4] d. error
Which of the following functions is used to remove string “python” from the list?
a. list.remove(python) b. list.delete(“python”)
c. list.remove(“python”) d. list.del
Which of the following functions is used to return a tuple to a list?
a. list(seq) b. seq(list)
c. list(tuple) d. tuple(list)