print(bytes("你好",encoding="GBK")).decode("GBK")#unicode转变为GBK
print(bytes("你好",encoding="utf-8"))#unicode转换成utf-8
网络编程 只能存二进制
照片和视频也是以二进制存的
html网页爬取也是编码
bytes字节转换
原文:https://www.cnblogs.com/648071634com/p/11679981.html