Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-106318: Add example forstr.find()
#134529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
str.endswith()
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1863,7 +1863,14 @@ expression support in the :mod:`re` module). | ||
Return the lowest index in the string where substring *sub* is found within | ||
the slice ``s[start:end]``. Optional arguments *start* and *end* are | ||
interpreted as in slice notation. Return ``-1`` if *sub* is not found. | ||
For example:: | ||
>>> 'spam, spam, spam'.find('sp') | ||
0 | ||
>>> 'spam, spam, spam'.find('sp', 5) | ||
6 | ||
See also :meth:`rfind` and :meth:`index`. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. We should use | ||
.. note:: | ||
The :meth:`~str.find` method should be used only if you need to know the | ||
Uh oh!
There was an error while loading.Please reload this page.