PyDocs

Nav

Python Runtime Services

str.find

builtins

method of str
  • str.find(sub[, start[, end]])
Return the lowest index in S where substring sub is found, such that sub is contained within S[start:end].

Optional arguments start and end are interpreted as in slice
notation.  Return -1 on failure.
1 Example
>>> 'spam, spam, spam'.find('sp')
0
>>> 'spam, spam, spam'.find('sp', 5)
6
from the Python docs
See Also
No see-alsos for builtins/str.find
0 Notes
No notes for str.find