Python_Institute
PCEP-30-02 · Question #323
What is the expected output of the following code? Print(len([i for i in range(0, -2)]))
The correct answer is D. 0. See the full explanation below for the reasoning.
Question
What is the expected output of the following code?
Print(len([i for i in range(0, -2)]))
Options
- A1
- B3
- C2
- D0
How the community answered
(34 responses)- A12% (4)
- B6% (2)
- C3% (1)
- D79% (27)
Community Discussion
No community discussion yet for this question.