PyDocs

Nav

Python Runtime Services

bytes.index

builtins

method of bytes
  • bytes.index(sub[, start[, end]])
Return the lowest index in B where subsection 'sub' is found, such that 'sub' is contained within B[start,end].

  start
    Optional start position. Default: start of the bytes.
  end
    Optional stop position. Default: end of the bytes.

Raise ValueError if the subsection is not found.
Changed in 3.3
  • 3.3: Also accept an integer in the range 0 to 255 as the subsequence.
0 Examples
No examples for builtins/bytes.index.
See Also
No see-alsos for builtins/bytes.index
0 Notes
No notes for bytes.index