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.
#!/usr/bin/env python2
f = open('file.dat', 'r')
f.seek(44)
value = int(f.read(1), 16)*2
print value
f.close()
output: 12