SyntaxFix
Write A Post
Hire A Developer
Questions
As mentioned by @john, the most robust answer is:
string = "a\nb\rv" new_string = " ".join(string.splitlines())