File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2612,7 +2612,9 @@ expression support in the :mod:`re` module).
26122612 :func: `re.split `). Splitting an empty string with a specified separator
26132613 returns ``[''] ``.
26142614
2615- For example::
2615+ For example:
2616+
2617+ .. doctest ::
26162618
26172619 >>> ' 1,2,3' .split(' ,' )
26182620 ['1', '2', '3']
@@ -2630,7 +2632,9 @@ expression support in the :mod:`re` module).
26302632 string or a string consisting of just whitespace with a ``None `` separator
26312633 returns ``[] ``.
26322634
2633- For example::
2635+ For example:
2636+
2637+ .. doctest ::
26342638
26352639 >>> ' 1 2 3' .split()
26362640 ['1', '2', '3']
@@ -2642,7 +2646,9 @@ expression support in the :mod:`re` module).
26422646 If *sep * is not specified or is ``None `` and *maxsplit * is ``0 ``, only
26432647 leading runs of consecutive whitespace are considered.
26442648
2645- For example::
2649+ For example:
2650+
2651+ .. doctest ::
26462652
26472653 >>> " " .split(None , 0 )
26482654 []
@@ -2651,7 +2657,7 @@ expression support in the :mod:`re` module).
26512657 >>> " foo " .split(maxsplit = 0 )
26522658 ['foo ']
26532659
2654- See also :meth: `join `.
2660+ See also :meth: `join ` and :meth: ` rsplit ` .
26552661
26562662
26572663.. index ::
You can’t perform that action at this time.
0 commit comments