I’m trying to understand how the range function works. Because I know that you can define each value. (the examples are from documentation)
range(stop=10, step=1, length=5)
And I know that you can forgo some of the keywords.
range(1, 100, step=5)
^^^This works.
range(1, 5, 5)
This works too, where the input is assumed to be start, stop, length.
But I’ve been unable to use step in this function without defining it. Is it possible to do so?
Also is it better to define the input values or not? Is it up to preference?
(Assuming by input value you mean the keyword argument (keys)), yeah, I’d say this is a personal preference. If you use the function a lot, you’ll likely get tired of typing out start = every time