bytes二进制文件类型
msg = "我爱你"
print(msg.encode(encoding='utf-8')) #转成bytes类型文件 编码
print(msg.encode(encoding="utf-8").decode(encoding="utf-8")) #转回str字符串类型 先编码-->解码
msg = "我爱你"
print(msg.encode(encoding='utf-8')) #转成bytes类型文件 编码
print(msg.encode(encoding="utf-8").decode(encoding="utf-8")) #转回str字符串类型 先编码-->解码