# change a hexadecimal string to decimal number and reverse # check two different representations of the hexadecimal string # negative values and zero are accepted # tested with Python24 vegaseat 11oct2005 def dec2hex(n): “””return the hexadecimal string representation of integer n””” return “%X” % n def hex2dec(s): “””return the integer value of a hexadecimal … Read more
