title: How to print a value as a hex
body: <p>I'm able to read a hexadecimal value from a file and multiply it, but how could I print it out as a hex too. Following prints value as an integer.</p>
  
  <pre><code>#!/usr/bin/env python2
  
  f = open('file.dat', 'r')
  f.seek(44)
  value  = int(f.read(1), 16)*2
  print value
  f.close()
  </code></pre>
  
  <p>output: 12</p>