nerdexam
Python_Institute

PCEP-30-02 · Question #330

How many elements will the following list contain? data = [i for i in range(-1, 2)]

The correct answer is E. three. See the full explanation below for the reasoning.

Question

How many elements will the following list contain? data = [i for i in range(-1, 2)]

Options

  • Aone
  • Btwo
  • Czero
  • Dfour
  • Ethree

How the community answered

(19 responses)
  • A
    5% (1)
  • B
    11% (2)
  • E
    84% (16)

Community Discussion

No community discussion yet for this question.

Full PCEP-30-02 Practice