title: Python - Decimal to Hex, Reverse byte order, Hex to Decimal
body: <p>I've been reading up a lot on stuct.pack and hex and the like.</p>
  
  <p>I am trying to convert a decimal to hexidecimal with 2-bytes. Reverse the hex bit order, then convert it back into decimal.</p>
  
  <p>I'm trying to follow these steps...in python</p>
  
  <pre><code>Convert the decimal value **36895** to the equivalent 2-byte hexadecimal value:
  
  **0x901F**
  Reverse the order of the 2 hexadecimal bytes:
  
  **0x1F90**
  Convert the resulting 2-byte hexadecimal value to its decimal equivalent:
  
  **8080**
  </code></pre>