title: python3 the way to write string into file in its entirety
body: <p>I am a newbie in Python3.
  I have a question in writing a string into a file.</p>
  
  <p>The below string is what I tried to write into a file.</p>
  
  <p><code>ÀH \x10\x08\x81\x00</code> (in hex, c04820108810)</p>
  
  <p>When I checked the file using <code>xxd</code> command, I could check there is a difference between the string and the file.</p>
  
  <pre><code>00000000: c380 4820 1008 c281 00                   ..H .....
  </code></pre>
  
  <p>This is code I wrote.</p>
  
  <pre><code>s = 'ÀH \x10\x08\x81\x00'
  with open('test', 'w') as f:
      f.write(s)
  </code></pre>
  
  <p>The question is how can I write this string into file in its entirety.</p>