Skip to content
Related Articles

Related Articles

Python-Quizzes | Python List Quiz | Question 24
  • Last Updated : 17 Sep, 2020

Question 24: Find the output of the following program:




L = [1, 3, 5, 7, 9
print(L.pop(-3), end = ' '

(A) 5
(B) 9
(C) 7
(D) 3


Answer: (A)

Explanation: pop() will delete and return the element whose index was passed as parameter. L.pop(-3) will delete 5 and return 5, which is printed by print().

Quiz of this Question

My Personal Notes arrow_drop_up