title: Newline character is ignored by Python
body: <p>When I'm trying to write a string <code>b'&lt;?xml version="1.0" encoding="utf-8"?&gt; \n&lt;response list="true"&gt;\n &lt;audio&gt;\n  &lt;aid&gt;412317542&lt;/aid&gt;\n</code>... to a new .xml file, it gets written as a <em>single line</em>, ignoring all <code>\n</code> characters. </p>
  
  <p>Why is it happening, and how do I get <em>several lines</em>? </p>
  
  <p>My code:</p>
  
  <pre><code>page = urlopen(url)
  html = page.read()    # Here I get the xml data
  with open('output.xml', 'w', encoding='utf-8') as f:
      f.write(str(html))
  </code></pre>