Sep-29-2016, 07:11 AM
given a string of hexadecimal characters that represent ASCII characters, i want to convert it to those ASCII characters. for example:
'707974686f6e2d666f72756d2e696f' -> 'python-forum.io'
in python 2 i can do .decode('hex') but this is gone in python3. so, i found this:
'707974686f6e2d666f72756d2e696f' -> 'python-forum.io'
in python 2 i can do .decode('hex') but this is gone in python3. so, i found this:
codecs.decode(codecs.decode('707974686f6e2d666f72756d2e696f','hex'),'ascii')anything simpler that works in either python 2 or python 3 ?