निम्नलिखित का आउटपुट क्या होगा?
What will be the output of the following?
print((range(4)))
A)
B)
C)
D)
Explanation:
In Python 3, range(4)
produces a range object, which is a sequence of numbers from 0 to 3, but not a list. So, when you print range(4)
, it shows the object representation, like range(0, 4)
.
Answer: (C) range(0,4)