You need to decode the bytes object to produce a string:

>>> b"abcde"

# utf-8 is used here because it is a very common encoding, but you
# need to use the encoding your data is actually in.
>>> b"abcde".decode("utf-8") 

Convert bytes to a string - Stack Overflow

How do I convert the bytes value back to string? I mean, using the "batteries" instead of doing it manually. And I'd like it to be OK with Python 3.

Built-in Types — Python 3.10.1 documentation

In Python 3.x, those implicit conversions are gone - conversions between 8-bit binary data and Unicode text must be explicit, and bytes and string objects ...

Python3中的bytesstr类型_lyb3b3b的专栏-CSDN博客_bytes str

2017年7月11日 ... Python 3最重要的新特性之一是对字符串和二进制数据流做了明确的区分。文本总是Unicode,由str类型表示,二进制数据则由bytes类型表示。Python 3不会 ...

Strings, Unicode, and Bytes in Python 3: Everything You Always ...

So, What About Unicode on Python 3? · str corresponds to the former unicode type on Python 2. It is represented internally as a sequence of Unicode codepoints.

Python 3 : Convert string to bytes -

Python 3 : Convert string to bytes. author image. By mkyong | Last updated: September 3, 2015. Viewed: 230,892 (+170 pv/w). Tags:python.

How to convert bytes to string in Python?

convert bytes to string in Python convert string to bytes in Python , We can convert bytes to String using bytes class decode() instance method, ...