File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -2620,7 +2620,9 @@ expression support in the :mod:`re` module).
26202620 :func: `re.split `). Splitting an empty string with a specified separator
26212621 returns ``[''] ``.
26222622
2623- For example::
2623+ For example:
2624+
2625+ .. doctest ::
26242626
26252627 >>> ' 1,2,3' .split(' ,' )
26262628 ['1', '2', '3']
@@ -2638,7 +2640,9 @@ expression support in the :mod:`re` module).
26382640 string or a string consisting of just whitespace with a ``None `` separator
26392641 returns ``[] ``.
26402642
2641- For example::
2643+ For example:
2644+
2645+ .. doctest ::
26422646
26432647 >>> ' 1 2 3' .split()
26442648 ['1', '2', '3']
@@ -2650,7 +2654,9 @@ expression support in the :mod:`re` module).
26502654 If *sep * is not specified or is ``None `` and *maxsplit * is ``0 ``, only
26512655 leading runs of consecutive whitespace are considered.
26522656
2653- For example::
2657+ For example:
2658+
2659+ .. doctest ::
26542660
26552661 >>> " " .split(None , 0 )
26562662 []
@@ -2659,7 +2665,7 @@ expression support in the :mod:`re` module).
26592665 >>> " foo " .split(maxsplit = 0 )
26602666 ['foo ']
26612667
2662- See also :meth: `join `.
2668+ See also :meth: `join ` and :meth: ` rsplit ` .
26632669
26642670
26652671.. index ::
You can’t perform that action at this time.
0 commit comments