Get Character by Unicode Code Point using Python

chr function

code = 'U+2122'
codeDec = int(code[2:], 16)
character = chr(codeDec)

print(character)  # ™

Leave a Comment

Cancel reply

Your email address will not be published.