Quote:this why i added the 2nd call to codecs.decode(,"ascii")You don't need a second call,just add .decode('utf-8').
>>> codecs.decode("707974686f6e2d666f72756d2e696f", "hex").decode('utf-8') 'python-forum.io'It will work the same in Python 2.x
>>> codecs.decode("707974686f6e2d666f72756d2e696f", "hex").decode('utf-8') u'python-forum.io'Strings are Unicode by default in Python 3.x.
>>> u'python-forum.io' == 'python-forum.io' True