title: Remove \n from string python 3.6
body: <p>I am trying to remove the \n characters from the output of a nslookup. While this seems like a simple task and there are many posts about filtering \n they do not seem to work for me. Code works perfectly in Python 2.7 however it does not in 3.6</p>
  
  <pre><code>mx = str(subprocess.check_output(('nslookup -type=mx ' + "test.nl"), shell=True))
  
  clean = re.sub(r"\n", " ", mx)
  clean2 = mx.replace("\n", " ")
  
  print(clean)
  print(clean2)
  </code></pre>
  
  <p>Output</p>
  
  <pre><code>\nNon-authoritative answer:\ntest.nl\tmail exchanger
  </code></pre>
  
  <p>Wanted result</p>
  
  <pre><code> Non-authoritative answer: test.nl\tmail exchanger
  </code></pre>
  
  <p>Neither of these work, however when I remove the '\' it filters the 'n' perfectly. Can anyone tell me what I am doing wrong? Or how I can achieve the wanted result?</p>
  
  <p>ps: Well aware this could be a duplicate and I'm just making a dumb mistake, However the solutions given in similar posts do not work for me.</p>