Описание тега python-unicode
Python distinguishes between byte strings and unicode strings. *Decoding* transforms bytestrings to unicode; *encoding* transform unicode strings to bytes.
Python distinguishes between byte strings and unicode strings. Decoding transforms bytestrings to unicode; encoding transform unicode strings to bytes.
Remember: you decode your input to unicode, work with unicode, then encode unicode objects for output as bytes.
See the