"Ricardo Aráoz" <[EMAIL PROTECTED]> wrote

>sorry, forgot a piece of the code :
>
>s = list(s)
>while s[0].isspace() :
>     while s[-1].isspace() :
>         del s[-1]
>     del s[0]
> s = ''.join(s)

It still won't work. Strings are immutable, you can't use del
to delete a character. Try it.

>>> del('foo'[-1])
Traceback (most recent call last):
  File "<input>", line 1, in ?
TypeError: object doesn't support item deletion
>>>


Alan G. 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to