File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2616,7 +2616,9 @@ expression support in the :mod:`re` module).
26162616 :func: `re.split `). Splitting an empty string with a specified separator
26172617 returns ``[''] ``.
26182618
2619- For example::
2619+ For example:
2620+
2621+ .. doctest ::
26202622
26212623 >>> ' 1,2,3' .split(' ,' )
26222624 ['1', '2', '3']
@@ -2634,7 +2636,9 @@ expression support in the :mod:`re` module).
26342636 string or a string consisting of just whitespace with a ``None `` separator
26352637 returns ``[] ``.
26362638
2637- For example::
2639+ For example:
2640+
2641+ .. doctest ::
26382642
26392643 >>> ' 1 2 3' .split()
26402644 ['1', '2', '3']
@@ -2646,7 +2650,9 @@ expression support in the :mod:`re` module).
26462650 If *sep * is not specified or is ``None `` and *maxsplit * is ``0 ``, only
26472651 leading runs of consecutive whitespace are considered.
26482652
2649- For example::
2653+ For example:
2654+
2655+ .. doctest ::
26502656
26512657 >>> " " .split(None , 0 )
26522658 []
@@ -2655,7 +2661,7 @@ expression support in the :mod:`re` module).
26552661 >>> " foo " .split(maxsplit = 0 )
26562662 ['foo ']
26572663
2658- See also :meth: `join `.
2664+ See also :meth: `join ` and :meth: ` rsplit ` .
26592665
26602666
26612667.. index ::
You can’t perform that action at this time.
0 commit comments