Re: trim start and trailing space chars from string

2007-09-15 Thread Rustom Mody
>>> 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 fro

Re: trim start and trailing space chars from string

2007-09-15 Thread John Machin
On Sep 15, 7:24 pm, 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"? http://docs.python.org/lib/string-methods.html -- htt

Re: trim start and trailing space chars from string

2007-09-15 Thread Tim Williams
On 15/09/2007, 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"? >>> ' asdf '.strip() 'asdf' >>> ' asdf '.rstrip() ' asdf' >>>

trim start and trailing space chars from string

2007-09-15 Thread Konstantinos Pachopoulos
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