Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 74efb71

Browse files
committed
Merge with 3.1.
2 parents 31dc373 + 0ed8c68 commit 74efb71

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Doc/library/stdtypes.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,6 +1047,15 @@ functions based on regular expressions.
10471047
*start* and *end* are interpreted as in slice notation. Return ``-1`` if
10481048
*sub* is not found.
10491049

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+
10501059

10511060
.. method:: str.format(*args, **kwargs)
10521061

0 commit comments

Comments
 (0)