Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2329,6 +2329,17 @@ expression support in the :mod:`re` module).
after the separator. If the separator is not found, return a 3-tuple containing
the string itself, followed by two empty strings.

For example:

.. doctest::

>>> 'Monty Python'.partition(' ')
('Monty', ' ', 'Python')
>>> 'Monty Python'.partition('-')
('Monty Python', '', '')

See also :meth:`rpartition`.


.. method:: str.removeprefix(prefix, /)

Expand Down
Loading