range(1)
The range of is a sequence of integers of length 1 starting from 0, ie: [0].
It should be noted that in Python, range
the starting value of the function is 0 by default, and its parameters are not included in the scope. So, if you want to generate a sequence of integers starting at 1, you can use range(1, n)
, where n
is the length of the sequence of integers you want to generate.