SyntaxFix
Write A Post
Hire A Developer
Questions
Another option is regex:
>>> import re >>> re.sub("\n|\r", "", "Foo\n\rbar\n\rbaz\n\r") 'Foobarbaz'