January 2019
Beginner
318 pages
8h 23m
English
In this section, we are going to learn about the unicode code point. Python has a powerful built-in function named ord() to get a Unicode code point from a given character. So, let's see an example of getting a Unicode code point from a character, as shown in the following code:
>>> str1 = u'Office'>>> for char in str1:... print('U+%04x' % ord(char))...U+004fU+0066U+0066U+0069U+0063U+0065>>> str2 =
>>> for char in str2:... print('U+%04x' % ord(char))...U+4e2dU+6587
Read now
Unlock full access