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 57aaee5 commit 10edc01Copy full SHA for 10edc01
Doc/library/stdtypes.rst
@@ -2231,6 +2231,19 @@ expression support in the :mod:`re` module).
2231
after the separator. If the separator is not found, return a 3-tuple containing
2232
the string itself, followed by two empty strings.
2233
2234
+ For example:
2235
+
2236
+ .. doctest::
2237
2238
+ >>> 'Monty Python'.partition(' ')
2239
+ ('Monty', ' ', 'Python')
2240
+ >>> "Monty Python's Flying Circus".partition(' ')
2241
+ ('Monty', ' ', "Python's Flying Circus")
2242
+ >>> 'Monty Python'.partition('-')
2243
+ ('Monty Python', '', '')
2244
2245
+ See also :meth:`rpartition`.
2246
2247
2248
.. method:: str.removeprefix(prefix, /)
2249
0 commit comments