File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2461,7 +2461,9 @@ expression support in the :mod:`re` module).
24612461 :func: `re.split `). Splitting an empty string with a specified separator
24622462 returns ``[''] ``.
24632463
2464- For example::
2464+ For example:
2465+
2466+ .. doctest ::
24652467
24662468 >>> ' 1,2,3' .split(' ,' )
24672469 ['1', '2', '3']
@@ -2479,7 +2481,9 @@ expression support in the :mod:`re` module).
24792481 string or a string consisting of just whitespace with a ``None `` separator
24802482 returns ``[] ``.
24812483
2482- For example::
2484+ For example:
2485+
2486+ .. doctest ::
24832487
24842488 >>> ' 1 2 3' .split()
24852489 ['1', '2', '3']
@@ -2491,7 +2495,9 @@ expression support in the :mod:`re` module).
24912495 If *sep * is not specified or is ``None `` and *maxsplit * is ``0 ``, only
24922496 leading runs of consecutive whitespace are considered.
24932497
2494- For example::
2498+ For example:
2499+
2500+ .. doctest ::
24952501
24962502 >>> " " .split(None , 0 )
24972503 []
@@ -2500,7 +2506,7 @@ expression support in the :mod:`re` module).
25002506 >>> " foo " .split(maxsplit = 0 )
25012507 ['foo ']
25022508
2503- See also :meth: `join `.
2509+ See also :meth: `join ` and :meth: ` rsplit ` .
25042510
25052511
25062512.. index ::
You can’t perform that action at this time.
0 commit comments