Skip to content

Commit

Permalink
Fix trailing space and location of example.
Browse files Browse the repository at this point in the history
  • Loading branch information
blaisep committed May 28, 2024
1 parent a0d7846 commit c82e92c
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2442,15 +2442,18 @@ If the separator is not found, return a 3-tuple containing
.. method:: str.startswith(prefix[, start[, end]])

Return ``True`` if string starts with the *prefix*, otherwise return ``False``.
*prefix* can also be a tuple of prefixes to look for::

>>> 'Python'.startswith('Py')
True


*prefix* can also be a tuple of prefixes to look for::

>>> 'a tuple of prefixes'.startswith(('at', 'in'))
False
>>> 'a tuple of suffixes'.startswith(('at', 'a'))
True


With optional *start*, test string beginning at that position::

Expand Down Expand Up @@ -3198,9 +3201,8 @@ arbitrary binary data.
Split the sequence at the first occurrence of *sep*, and return a 3-tuple
containing the part before the separator, the separator itself or its
bytearray copy, and the part after the separator.
If the separator is not found, return a 3-tuple
containing a copy of the original sequence, followed by two empty bytes or
bytearray objects.
If the separator is not found, return a 3-tuple containing a copy of the original sequence,
followed by two empty bytes or bytearray objects.

The separator to search for may be any :term:`bytes-like object`.

Expand Down

0 comments on commit c82e92c

Please sign in to comment.