RANGE()
This is a built-in function used to generate a sequence of numbers, typically for use in loops. It can be called with one, two, or three arguments: range(stop), range(start, stop), or range(start, stop, step). The sequence begins at start (default 0), increases by step (default 1), and stops before stop, making the ending value exclusive. Because range() produces numbers lazily, it doesn’t create a full list in memory, which makes it efficient for large loops. You can convert it to a list with list(range(...)) if you need the actual values. It's commonly used for counting iterations, indexing through sequences, or generating predictable numeric patterns.
for i in range(start, stop, step):
# do somethingLast updated