Chopping off spaces at both ends
bokr at oz.net
Mon Aug 8 00:25:34 CEST 2005
On 7 Aug 2005 10:14:33 -0700, "Kay Schluehr" <kay.schluehr at gmx.net> wrote:
>Use the strip() method.
>>>> "\t abc \n".strip()
>Variants are lstrip() and rstrip().
and also occasionally useful:
I.e., a strip argument as an unordered set of characters that
causes stripping so long as characters at the end(s) of the
string being stripped are found that are in the set.
More information about the Python-list