Get Unicode Code Point of Character using Python

ord function

character = '™'
code = 'U+%04X' % ord(character)

print(code)  # U+2122

Leave a Comment

Cancel reply

Your email address will not be published.