I\'d like to convert some character into five digit unicode on in Python 3.3. For example,
import re print(re.sub(\'a\', u\'\\u1D15D\', \'abc\' ))
By the way, you do not need the re module for this. You could use str.translate:
re
>>> 'abc'.translate({ord('a'):'\U0001D15D'}) '