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.
1 parent 2494a90 commit 27baa1cCopy full SHA for 27baa1c
Doc/library/stdtypes.rst
@@ -2483,6 +2483,19 @@ expression support in the :mod:`re` module).
2483
after the separator. If the separator is not found, return a 3-tuple containing
2484
the string itself, followed by two empty strings.
2485
2486
+ For example:
2487
+
2488
+ .. doctest::
2489
2490
+ >>> 'Monty Python'.partition(' ')
2491
+ ('Monty', ' ', 'Python')
2492
+ >>> "Monty Python's Flying Circus".partition(' ')
2493
+ ('Monty', ' ', "Python's Flying Circus")
2494
+ >>> 'Monty Python'.partition('-')
2495
+ ('Monty Python', '', '')
2496
2497
+ See also :meth:`rpartition`.
2498
2499
2500
.. method:: str.removeprefix(prefix, /)
2501
0 commit comments