Carefully analyze the following Python program segment and determine the…

Carefully analyze the following Python program segment and determine the correct output:

L = [4, 7, 2, 8, 2, 5]

L.insert(1, 0)

L.pop(2)

L.remove(2)

L.extend([3, 1])

print(L)

  1. A.

    [0, 4, 8, 2, 5, 3, 1]

  2. B.

    [4, 0, 8, 2, 5, [3, 1]]

  3. C.

    [4, 0, 8, 2, 5, [3, 1]]

  4. D.

    [4, 0, 8, 2, 5, 3, 1]

Attempted by 376 students.

Sign up free to check your answer

Sign up free

Explore the full course: Hpsc Pgt Computer Science

Loading lesson…