← BYTES
Python·Starter·Ref: 6.1.8
What does `range(5)` produce?
Have a question about this video? Mention reference 6.1.8 when you contact us.
a.The list [1, 2, 3, 4, 5]
b.A sequence representing 0, 1, 2, 3, 4
c.The number 5
d.An error, since range requires two arguments
`range(5)` with a single argument produces a range object that, when iterated, yields 0 through 4 (5 numbers total, starting from 0 by default) -- it does not include 5 itself.
Find this on YouTube & Instagram
Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:
#BYTES#BYTES618#Python