Range Attributes

range.stop

Stored exclusive boundary. It need not be reachable by the step and is never an included value. Equal ranges may have different stop bounds because equality compares represented sequences. Access without parentheses; the attribute is read-only.

Formal Syntax & Structure

python syntaxpython
value.stop

Return Value

int

Stored integer bound or stride.

Working Example

Example Snippetpython
r = range(2, 10, 3)print(r.stop)print(list(r))
Python Reference