PyDocs

Nav

Python Runtime Services

slice.indices

builtins

method of slice
  • slice.indices(self, length)
S.indices(len) -> (start, stop, stride)

Assuming a sequence of length len, calculate the start and stop
indices, and the stride length of the extended slice described by
S. Out of bounds indices are clipped in a manner consistent with the
handling of normal slices.
0 Examples
No examples for builtins/slice.indices.
See Also
No see-alsos for builtins/slice.indices
0 Notes
No notes for slice.indices