According to the Python documentation, when I do a range of (0, 10), the output of this function is a list from 0 to 9, i.e. [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]. However, installing Python on my PC does not display this, despite many examples of this work on the Internet.
Here is my test code ...
test_range_function = range(0, 10) print(test_range_function) print(type(test_range_function))
The result of this, which I think of, should be printed in a list, and the type function should output it as a list. Instead, I get the following output ...
c:\Programming>python range.py range(0, 10) <class 'range'>
I have not seen this in any of the examples on the Internet, and I would really appreciate that this light failed.
source share