deleting the first and the last character of a string
Manuel Hendel
manuel at hendel.net
Wed Sep 11 07:51:18 EDT 2002
On Wed, Sep 11, 2002 at 12:30:40PM +0100, Padraig Brady wrote:
> How about: line = line[1:-1]
This worked quite good, but I found another problem. There seams to be
trailing whitespaces. I tried to strip(s) to get rid of them, but this
doesn't work, I get the following error message:
Traceback (most recent call last):
File "./pop3create.py", line 9, in ?
print strip(line)
NameError: name 'strip' is not defined
What's wrong here?
manuel
--
Technological progress has merely provided us with more efficient means for
going backwards.
-Aldous Huxley
More information about the Python-list
mailing list