Q. What does range(3) produce?

A
[0, 1, 2, 3]
B
[0, 1, 2]
C
[1, 2, 3]
D
[0, 3]
Solution:

range(3) produces [0, 1, 2], a sequence starting at 0 up to but not including 3.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!