title: Python write string of bytes to file
body: <p>How do I write a string of bytes to a file, in byte mode, using python?</p>
  
  <p>I have:</p>
  
  <pre><code>['0x28', '0x0', '0x0', '0x0']
  </code></pre>
  
  <p>How do I write 0x28, 0x0, 0x0, 0x0 to a file? I don't know how to transform this string to a valid byte and write it.</p>