title: How to convert HEX string to Float (Little Endian)
body: <p>I just learned Python (3.x) and I am stuck with HEX String conversion to Float. I have this HEX String values:
  <code>'0x22354942F31AFA42CE6A494311518A43082CAF437C6BD4C35F78FA433BF10F442A5222448D3D3544200749C438295C4468AF6E4406B4804450518A4423B0934450E99CC4'</code>
  And I want to turn it into float. </p>
  
  <p>I have tried to use this code:</p>
  
  <pre><code>bs=bytes.fromhex(row[2:])
  fmt = '&lt;' + ('H' * (len(bs) // 2))
  res=struct.unpack(fmt, bs)
  </code></pre>
  
  <p>and it gives me the result of <code>13602.0,16969.0,6899.0,17146.0,27342.0,17225.0,20753.0,17290.0,11272.0,17327.0,27516.0,50132.0,30815.0,17402.0,61755.0,17423.0,21034.0,17442.0,15757.0,17461.0,1824.0,50249.0,10552.0,17500.0,44904.0,17518.0,46086.0,17536.0,20816.0,17546.0,45091.0,17555.0,59728.0,50332.0</code></p>
  
  <p>After checking it, I found out that the code that what I currently have is float in base 16, while I need it in base 32 (or maybe not because I am not sure what base/format), with expected float results as <code>50.3018875, 125.052635,201.4172,276.633331,350.344,424.839722,500.9404,575.7692,649.2838,724.961731,804.1113,880.644043,954.7407,1029.62573,106.541,1181.50427,1255.291</code> the values which I got from this <a href="https://www.scadacore.com/tools/programming-calculators/online-hex-converter/" rel="nofollow noreferrer">Calculator Converter</a>.
  What should I change in the coding to get the expected results?
  Thank you.</p>