在 Python3 中,bytes 和 str 的互相转换方式是:str.encode('utf-8')、bytes.decode('utf-8')

在 Python3 中,bytes 和 str 的互相转换方式是:
str.encode('utf-8')
bytes.decode('utf-8')

原文地址:https://www.cnblogs.com/cag2050/p/13644329.html