def hexToString(hexString):
 string = ''
 if ((len(hexString) % 2) != 0):
  hexString = ('0' + hexString)
 try:
  for i in range(0, len(hexString), 2):
   string += chr(int((hexString[i] + hexString[(i + 1)]), 16))
 except:
  return ((-1), 'Error in hexadecimal conversion')
 return (0, string)

def hexToString ( hexString ) : string = '' if ( ( len ( hexString ) % 2 ) != 0 ) : hexString = ( '0' + hexString ) try : for i in range ( 0 , len ( hexString ) , 2 ) : string += chr ( int ( ( hexString [ i ] + hexString [ ( i + 1 ) ] ) , 16 ) ) except : return ( ( - 1 ) , 'Error in hexadecimal conversion' ) return ( 0 , string )
simple method to convert an hexadecimal string to ascii string .