Hi i have the following code in python3.4.2:
s='416f1c7918f83a4f1922d86df5e78348'; w="0123456789abcdef"; x=''.join([chr(w.index(s[i])*16+w.index(s[i+1])) if(i%2==0) else '' for i in range(len(s))]); print(x);
and it shows this error
UnicodeEncodeError:
'ascii' codec can't encode character '\xf8' in position 5: ordinal not in range
(128)
Why is this happening ? isn't chr in python3 supposed to take more than 128 ?