Return a copy of the string with leading characters removed. The *chars*
argument is a string specifying the set of characters to be removed. If omitted
- or ``None``, the *chars* argument defaults to removing whitespace. The *chars*
+ or ``None``, the *chars* argument defaults to removing whitespace, that is
+ characters for which :meth:`str.isspace` is true. The *chars*
argument is not a prefix; rather, all combinations of its values are stripped::
>>> ' spacious '.lstrip()
Return a copy of the string with trailing characters removed. The *chars*
argument is a string specifying the set of characters to be removed. If omitted
- or ``None``, the *chars* argument defaults to removing whitespace. The *chars*
+ or ``None``, the *chars* argument defaults to removing whitespace, that is
+ characters for which :meth:`str.isspace` is true. The *chars*
argument is not a suffix; rather, all combinations of its values are stripped.
For example:
Return a copy of the string with the leading and trailing characters removed.
The *chars* argument is a string specifying the set of characters to be removed.
- If omitted or ``None``, the *chars* argument defaults to removing whitespace.
- The *chars* argument is not a prefix or suffix; rather, all combinations of its
- values are stripped.
-
- Whitespace characters are defined by :meth:`str.isspace`.
+ If omitted or ``None``, the *chars* argument defaults to removing whitespace,
+ that is characters for which :meth:`str.isspace` is true. The *chars* argument
+ is not a prefix or suffix; rather, all combinations of its values are stripped.
For example: