text = b'\r\nHello World!\r\n' text = text.decode().strip() print(text) # Output: 'Hello World!'
stroka = stroka.replace("b'\r\n'", "")