Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 31dc373 + 0ed8c68 commit 74efb71Copy full SHA for 74efb71
1 file changed
Doc/library/stdtypes.rst
@@ -1047,6 +1047,15 @@ functions based on regular expressions.
1047
*start* and *end* are interpreted as in slice notation. Return ``-1`` if
1048
*sub* is not found.
1049
1050
+ .. note::
1051
+
1052
+ The :meth:`~str.find` method should be used only if you need to know the
1053
+ position of *sub*. To check if *sub* is a substring or not, use the
1054
+ :keyword:`in` operator::
1055
1056
+ >>> 'Py' in 'Python'
1057
+ True
1058
1059
1060
.. method:: str.format(*args, **kwargs)
1061
0 commit comments