Just van Rossum wrote: > Stephen Boulet 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 > > > > > > > > Hmm. I'm using 1.5.1 for HPUX 10.x. Maybe I need to upgrade... > > Hm, it works even in Python 1.5: > > Python 1.5 (#13, Jun 15 1998, 17:37:50) [GCC 2.7.2.1] on bsdos4 > Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam > >>> import string > >>> string.strip(" 15157 ? 0:01 ttsession\012") > '15157 ? 0:01 ttsession' > >>> > > Just Nevermind <hides head in shame>. I'm not sure what happened. I thought I cut and pasted that exactly, but now in the script file I wrote I noticed that "import string" statement was missing. -- Stephen
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4