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 43b9344 commit 6884288Copy full SHA for 6884288
Doc/library/stdtypes.rst
@@ -2242,6 +2242,19 @@ expression support in the :mod:`re` module).
2242
after the separator. If the separator is not found, return a 3-tuple containing
2243
the string itself, followed by two empty strings.
2244
2245
+ For example:
2246
+
2247
+ .. doctest::
2248
2249
+ >>> 'Monty Python'.partition(' ')
2250
+ ('Monty', ' ', 'Python')
2251
+ >>> "Monty Python's Flying Circus".partition(' ')
2252
+ ('Monty', ' ', "Python's Flying Circus")
2253
+ >>> 'Monty Python'.partition('-')
2254
+ ('Monty Python', '', '')
2255
2256
+ See also :meth:`rpartition`.
2257
2258
2259
.. method:: str.removeprefix(prefix, /)
2260
0 commit comments