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 1cc7551 commit 501a327Copy full SHA for 501a327
1 file changed
Doc/library/stdtypes.rst
@@ -2329,6 +2329,15 @@ expression support in the :mod:`re` module).
2329
after the separator. If the separator is not found, return a 3-tuple containing
2330
the string itself, followed by two empty strings.
2331
2332
+ For example:
2333
+
2334
+ .. doctest::
2335
2336
+ >>> 'Monty Python'.partition(' ')
2337
+ ('Monty', ' ', 'Python')
2338
+ >>> 'Monty Python'.partition('-')
2339
+ ('Monty Python', '', '')
2340
2341
2342
.. method:: str.removeprefix(prefix, /)
2343
0 commit comments