title: How to convert a string to "04x" hex in little endian format?
body: <p>When I convert the a string in 04x hex it will be like this,</p>
  
  <pre><code>"".join("{:04x}".format(ord(c)) for c in "USERDOMAIN")
  ==&gt; 00550053004500520044004f004d00410049004e
  </code></pre>
  
  <p>However I need it in little endian format? In this example</p>
  
  <pre><code>==&gt; 550053004500520044004f004d00410049004e00
  </code></pre>
  
  <p>How should I calculate this value (I mean little endian format of USERDOMAIN 04x hex) in python?</p>