Franz Steinhaeusler <[EMAIL PROTECTED]> wrote: >On Thu, 23 Feb 2006 13:54:50 +0000, Martin Franklin >>why not use string methods strip, rstrip and lstrip >because this removes only the last spaces, > [given r = 'erewr \r\nafjdskl '] >I want: >'erewr\r\nafjdskl'
os.linesep.join(l.rstrip() for l in r.split(os.linesep)) -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ ___ | "Frankly I have no feelings towards penguins one way or the other" \X/ | -- Arthur C. Clarke her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
-- http://mail.python.org/mailman/listinfo/python-list