SyntaxFix
Write A Post
Hire A Developer
Questions
If you want a version that raises an error:
"string to search".index("needle")
If you want a version that returns -1:
"string to search".find("needle")
This is more efficient than the 'in' syntax