On Thu, 16 Aug 2012 15:09:47 -0700, Charles Jensen wrote: > 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)
the same way you did in your original example by defining the string ass unicode a=u'...' ord(a) -- Keep on keepin' on. -- http://mail.python.org/mailman/listinfo/python-list