0% 1 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.insert(2,'i') B) L.append(2,'i') C) L.extend(3,'i') D) L.insert(3,'i') 2 / 15 2. 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,2,3,4,5,6] D) [1,3,5,[2,4,6]] 3 / 15 3. 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[6] C) L[5] D) L[-1] 4 / 15 4. Which of the following will create an empty list? A) L=[list] B) L=List(empty) C) L=[ ] D) L=list(0) 5 / 15 5. Which of the following can add multiple elements to a list? A) append() B) extend() C) addmany() D) add() 6 / 15 6. Which of the following function can add only one element to a list ? A) append() B) extend() C) addone() D) add() 7 / 15 7. Which one of the following will always return a list? A) reverse() B) max() C) sorted() D) sort() 8 / 15 8. A python list can contain values of these types: A) integer B) string C) any data type out of float, integer, string D) float 9 / 15 9. Given a list L=[10,20,30,40,50,60,70], what would L[2:-2] return? A) [30,40,50] B) [20,30,40] C) [20,30,40,50] D) [40,50,60] 10 / 15 10. Given a list L=[10,20,30,40,50,60,70], what would L[-3:99] return? A) [20,30,40] B) [30,40,50] C) [40,50,60] D) [50,60,70] 11 / 15 11. What will be printed with the following python code ? print(list(range(3))) A) [0,1,2,3] B) 0,1,2 C) [0,1,2] D) [1,2,3] 12 / 15 12. Given a list L=[10,20,30,40,50,60], what would L[1:4] return? A) [20,30,40,50] B) [30,40,50] C) [10,20,30,40] D) [20,30,40] 13 / 15 13. Which of the following can delete an element from a list, if its value is given? A) delval() B) remove() C) drop() D) delete() 14 / 15 14. 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) ['a','o'] B) ['b','c'] C) ['o','c','p'] D) ['o','p'] 15 / 15 15. Given a list L=[10,20,30,40,50,60,70], what would L[-4:-1] return? A) [30,40,50] B) [20,30,40] C) [50,60,70] D) [40,50,60] Your score is The average score is 87%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)