I'm reading output from program like this
test_output = test_run.communicate(input=str.encode(input))
output = test_output .decode('utf-8').strip()
and if program returns new line like this
it reads it like this(with
I tried removing line breaks with
but it's not working, if I print it like regular string it returns
How can I remove \r\n from my string?