R
Robert Oschler
Hello,
I am using the following function to try and strip both carraige returns and
line feeds, ASCII 13 and 10 respectively, from a string. It doesn't seem to
be working:
x = filter(lambda c: c not in "\012\015", string.strip(x)) # octal version
I also tried:
x = filter(lambda c: c not in "\r\n", string.strip(x)) # escape char.
version
What am I doing wrong?
Thanks
I am using the following function to try and strip both carraige returns and
line feeds, ASCII 13 and 10 respectively, from a string. It doesn't seem to
be working:
x = filter(lambda c: c not in "\012\015", string.strip(x)) # octal version
I also tried:
x = filter(lambda c: c not in "\r\n", string.strip(x)) # escape char.
version
What am I doing wrong?
Thanks