File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -2777,7 +2777,11 @@ expression support in the :mod:`re` module).
27772777 The *chars * argument is a string specifying the set of characters to be removed.
27782778 If omitted or ``None ``, the *chars * argument defaults to removing whitespace.
27792779 The *chars * argument is not a prefix or suffix; rather, all combinations of its
2780- values are stripped::
2780+ values are stripped.
2781+
2782+ For example:
2783+
2784+ .. doctest ::
27812785
27822786 >>> ' spacious ' .strip()
27832787 'spacious'
@@ -2788,7 +2792,10 @@ expression support in the :mod:`re` module).
27882792 from the string. Characters are removed from the leading end until
27892793 reaching a string character that is not contained in the set of
27902794 characters in *chars *. A similar action takes place on the trailing end.
2791- For example::
2795+
2796+ For example:
2797+
2798+ .. doctest ::
27922799
27932800 >>> comment_string = ' #....... Section 3.2.1 Issue #32 .......'
27942801 >>> comment_string.strip(' .#! ' )
You can’t perform that action at this time.
0 commit comments