Check sibling questions
Computer Science - Class 12
Chapter 14 - Functions in python

Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.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]

 

Answer:

The pop( ) function removes the element at the position specified in the parameter. 

Here, the position mentioned is 1 and the element at position 1 is 4. 

So, 4 is removed and list1 will become [3,5,20,5,25,1,3].

So, the correct answer is (c).

Are ads bothering you?

CA Maninder Singh's photo - Expert in Practical Accounts, Taxation and Efiling

Made by

CA Maninder Singh

CA Maninder Singh is a Chartered Accountant for the past 12 years. He also provides Accounts Tax GST Training in Delhi, Kerala and online.