Home
/
Python 3.11
/
Built-in Types
/
index
Python 3.0
Python 3.9
Python 3.11
Functions
ID
EN
…
Built-in Types
index
Python 3.11
Like find(), but raise ValueError when the substring is not found.
Syntax
PYTHON
Copy
str.index(sub[, start[, end]])
See Also
find()
ValueError