Newby question - Trimming spaces from a string

Glen Mettler gem at hsv.crc.com
Fri Jun 8 14:53:25 EDT 2001


I found it!  It is String.Strip()
Interestingly enough, neither of the two books I have ("Learning Python" and
"Programming Python" discuss this.  I had to download "Lib.pdf" from the web
to find all the object model properties for "String"

Glen

"Glen Mettler" <gem at hsv.crc.com> wrote in message
news:newscache$qu5meg$we5$1 at news.crc.com...
> I have a string "   abcd   " and I need to trim the leading and trailing
> spaces so that I get "abcd"
> How do I do that?
>
> Glen
>
>





More information about the Python-list mailing list