I\'m trying to remove all newline characters from a string. I\'ve read up on how to do it, but it seems that I for some reason am unable to do so. Here is step by step what
As mentioned by @john, the most robust answer is:
string = "a\nb\rv" new_string = " ".join(string.splitlines())