0% 1 Get ready, set, go Time ended Quiz on Python List This is a comprehensive MCQ quiz on Python Lists 1 / 15 1. If L1=[1,3,5] and L2=[2,4,6] then L1+L2 will yield A) [3,7,11] B) [1,2,3,4,5,6] C) [1,3,5,2,4,6] D) [1,3,5,[2,4,6]] 2 / 15 2. A list L has 5 items. Which one of the following statements will return the last element of the list? A) L[-1] B) L[5] C) L[6] D) L[4] 3 / 15 3. Which of the following can add multiple elements to a list? A) addmany() B) extend() C) add() D) append() 4 / 15 4. Which of the following will create an empty list? A) L=List(empty) B) L=[list] C) L=[ ] D) L=list(0) 5 / 15 5. 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) ['o','c','p'] B) ['a','o'] C) ['o','p'] D) ['b','c'] 6 / 15 6. Which of the following function can add only one element to a list ? A) addone() B) add() C) extend() D) append() 7 / 15 7. A python list can contain values of these types: A) integer B) any data type out of float, integer, string C) float D) string 8 / 15 8. 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(3,'i') B) L.insert(2,'i') C) L.extend(3,'i') D) L.append(2,'i') 9 / 15 9. What will be printed with the following python code ? print(list(range(3))) A) [0,1,2] B) [1,2,3] C) 0,1,2 D) [0,1,2,3] 10 / 15 10. 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) [20,30,40] D) [30,40,50] 11 / 15 11. 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] 12 / 15 12. Which of the following can delete an element from a list, if its value is given? A) delval() B) remove() C) delete() D) drop() 13 / 15 13. Which one of the following will always return a list? A) sorted() B) sort() C) reverse() D) max() 14 / 15 14. 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) [40,50,60] D) [50,60,70] 15 / 15 15. 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] D) [20,30,40,50] 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)