codice:
intvar = 47
hexvar = hex(intvar)
print intvar, "   to hex = ", hexvar
newintvar = int(hexvar, 16)
print hexvar, " to int = ", newintvar