nerdexam
Python_Institute

PCEP-30-02 · Question #373

What is the expected output of the following code? nums = [3, 4, 5, 20, 5, 25, 1, 3] nums.pop(1) print(nums)

The correct answer is C. [3, 5, 20, 5, 25, 1, 3]. See the full explanation below for the reasoning.

Question

What is the expected output of the following code? nums = [3, 4, 5, 20, 5, 25, 1, 3] nums.pop(1) print(nums)

Options

  • A[3, 1, 25, 5, 20, 5, 4]
  • B[3, 4, 5, 20, 5, 25]
  • C[3, 5, 20, 5, 25, 1, 3]
  • D[1, 3, 3, 4, 5, 20, 25]
  • E[3, 4, 5, 20, 5, 25, 1, 3]

How the community answered

(37 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    70% (26)
  • D
    8% (3)
  • E
    16% (6)

Community Discussion

No community discussion yet for this question.

Full PCEP-30-02 Practice