How do I display unicode value stored in a string variable using ord()
Charles Jensen
hopefullycharles at gmail.com
Thu Aug 16 18:09:47 EDT 2012
Everyone knows that the python command
ord(u'…')
will output the number 8230 which is the unicode character for the horizontal ellipsis.
How would I use ord() to find the unicode value of a string stored in a variable?
So the following 2 lines of code will give me the ascii value of the variable a. How do I specify ord to give me the unicode value of a?
a = '…'
ord(a)
More information about the Python-list
mailing list