On 24 Feb 2006 14:12:05 +0000 (GMT), Sion Arrowsmith <[EMAIL PROTECTED]> wrote:
>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)) Hello Sion, thank you, your solution, I like most!! (it is clean und one don't have to use re's). -- Franz Steinhaeusler -- http://mail.python.org/mailman/listinfo/python-list