0% 0 Get ready, set, go Time ended Quiz on Python List This is a comprehensive MCQ quiz on Python Lists 1 / 15 1. Given a list of letters, L=['a','e','o','u'], select the correct statement to add one more item, 'i' after 'e' in the list. A) L.extend(3,'i') B) L.append(2,'i') C) L.insert(2,'i') D) L.insert(3,'i') 2 / 15 2. Which of the following can delete an element from a list, if its value is given? A) delval() B) delete() C) remove() D) drop() 3 / 15 3. Given a list L=[10,20,30,40,50,60,70], what would L[-3:99] return? A) [50,60,70] B) [40,50,60] C) [30,40,50] D) [20,30,40] 4 / 15 4. Which of the following can add multiple elements to a list? A) extend() B) append() C) addmany() D) add() 5 / 15 5. Given a list L=[10,20,30,40,50,60], what would L[1:4] return? A) [20,30,40] B) [30,40,50] C) [10,20,30,40] D) [20,30,40,50] 6 / 15 6. Which of the following will create an empty list? A) L=List(empty) B) L=[ ] C) L=[list] D) L=list(0) 7 / 15 7. Assume a list: letters=['a','b','o','c','p'], What would be displayed in a Python shell for the given expression? >>>letters[2:5:2] A) ['b','c'] B) ['o','p'] C) ['a','o'] D) ['o','c','p'] 8 / 15 8. Given a list L=[10,20,30,40,50,60,70], what would L[2:-2] return? A) [40,50,60] B) [30,40,50] C) [20,30,40,50] D) [20,30,40] 9 / 15 9. Which of the following function can add only one element to a list ? A) addone() B) extend() C) append() D) add() 10 / 15 10. Which one of the following will always return a list? A) reverse() B) sorted() C) sort() D) max() 11 / 15 11. If L1=[1,3,5] and L2=[2,4,6] then L1+L2 will yield A) [1,3,5,[2,4,6]] B) [3,7,11] C) [1,3,5,2,4,6] D) [1,2,3,4,5,6] 12 / 15 12. What will be printed with the following python code ? print(list(range(3))) A) [0,1,2] B) [0,1,2,3] C) 0,1,2 D) [1,2,3] 13 / 15 13. Given a list L=[10,20,30,40,50,60,70], what would L[-4:-1] return? A) [30,40,50] B) [40,50,60] C) [50,60,70] D) [20,30,40] 14 / 15 14. A list L has 5 items. Which one of the following statements will return the last element of the list? A) L[4] B) L[-1] C) L[5] D) L[6] 15 / 15 15. A python list can contain values of these types: A) string B) any data type out of float, integer, string C) integer D) float Your score is The average score is 0%Share this quiz with your friends, LinkedIn Facebook Twitter 0% Restart quiz Rate the quiz Send feedback Post navigation Quiz on Python Dictionary Quiz on Python Pandas Series (Class 12 IP)