Error with string.strip

Aahz Maruch aahz at panix.com
Fri Apr 20 12:02:02 EDT 2001


In article <3AE05834.93331DA5 at comm.mot.com>,
Stephen Boulet  <stephen.boulet at motorola.com> wrote:
>
>>>> import string
>>>> string.strip("all's well as ends well     ")
>"all's well as ends well"
>>>> string.strip(" 15157 ?         0:01 ttsession\012")
>  File "<stdin>", line 1
>    string.strip(' 15157 ?         0:01 ttsession\012')
>                                                       ^
>SyntaxError: invalid syntax
>
>Can someone tell me why this doesn't work? Thanks.

No, because it works for me.  What version of Python are you using?  Is
that literally a cut'n'paste?
-- 
                      --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)

Androgynous poly kinky vanilla queer het Pythonista   http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

"Beware of companies that claim to be like a family.  They might not be
lying."  --Jill Lundquist



More information about the Python-list mailing list