>>> s="     abcdef     "
>>> s.strip()
'abcdef'
>>> s.rstrip()
'     abcdef'
>>> s.lstrip()
'abcdef     '
>>>


On 9/15/07, Konstantinos Pachopoulos <[EMAIL PROTECTED]> wrote:
> Hi,
> is there something corresponding to the java String.trim() method, ie
> trim start and trailing space/tab chars from string?
> say convert " asdf   "  to "asdf"?
>
> Thnx
> --
> http://mail.python.org/mailman/listinfo/python-list
>
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to