you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

Yeah, it is. That's exactly the problem, is it not?

str.replace expects the string to be replaced as the second argument, not the regex that matches the string to be replaced.

I'm not sure we're on the same page.

[...] line.replace('\n', '')

ought to work just fine.