[Tutor] String puzzle...

Sean 'Shaleh' Perry shalehperry@home.com
Fri, 01 Jun 2001 07:14:49 -0700 (PDT)


>###
>>>> myform = '''this is a test form
> 
> with some carriage\r\n returns in it.'''
>>>> myform = myform.replace('\r', '')
>###
> 

or simply use strip(), which will remove leading and trailing whitespace of any
kind.  Which, in this instance seems like the right thing to do.  There is also
rstrip() which only strips from the right.