Start of sequence (or end if only one argument).
Optionalend: number
End of sequence (exclusive).
Optionalstep: number
Increment (default: 1 or 1n).
A Generator yielding the sequence.
Floating-point arguments may cause imprecise results due to accumulation errors.
Use safe-integer arguments with every intermediate value remaining a safe
integer, or use bigint, for reliable exact sequences. Numeric addition is
not checked for progress: near precision limits, adding step may leave the
value unchanged, repeating it indefinitely even with a finite endpoint.
Creates a lazy generator yielding a sequence of numbers or bigints (like Python's range()).
range(end) — [0, end)range(start, end) — [start, end)range(start, end, step) — [start, end) with custom stepDefault step is 1 (or 1n). For descending ranges, provide a negative step.
Start of sequence (or end if only one argument).
Optionalend: bigint
End of sequence (exclusive).
Optionalstep: bigint
Increment (default: 1 or 1n).
A Generator yielding the sequence.
Floating-point arguments may cause imprecise results due to accumulation errors.
Use safe-integer arguments with every intermediate value remaining a safe
integer, or use bigint, for reliable exact sequences. Numeric addition is
not checked for progress: near precision limits, adding step may leave the
value unchanged, repeating it indefinitely even with a finite endpoint.
Creates a lazy generator yielding a sequence of numbers or bigints (like Python's
range()).range(end)—[0, end)range(start, end)—[start, end)range(start, end, step)—[start, end)with custom stepDefault step is
1(or1n). For descending ranges, provide a negative step.