Staging: this is not the live site, pydocs.org.
slice(stop)
slice(start, stop[, step])
Create a slice object.
This is used for extended slicing (e.g. a[0:10:2]).
Changed in 3.12
- 3.12: Slice objects are now hashable (provided start, stop, and step are hashable).
Members of slice
i
- indices
- Assuming a sequence of length len, calculate the start and stop indices, and the stride length of the extended slice described by S.
s
- start
- These read-only attributes are set to the argument values (or their default).
- step
- These read-only attributes are set to the argument values (or their default).
- stop
- These read-only attributes are set to the argument values (or their default).