Encoding

The transformation from Unicode code point to byte string is known as encoding. So, let's see an example of how to encode Unicode code point, as shown in following code:

>>> str = u'Office'
>>> enc_str = type(str.encode('utf-8'))
>>> enc_str
<class 'bytes'>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset