1.

Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop(1)?(a) [3, 4, 5, 20, 5, 25, 1, 3](b) [1, 3, 3, 4, 5, 5, 20, 25](c) [3, 5, 20, 5, 25, 1, 3](d) [1, 3, 4, 5, 20, 5, 25]The question was asked by my college professor while I was bunking the class.Origin of the question is Lists in portion Lists & List Comprehension of Python

Answer»

The correct CHOICE is (c) [3, 5, 20, 5, 25, 1, 3]

The EXPLANATION is: pop() removes the element at the position SPECIFIED in the PARAMETER.



Discussion

No Comment Found

Related InterviewSolutions