摘要:
https://www.runoob.com/python/python-json.html 阅读全文
摘要:
函数encode()、decode()用于bytes和str两种类型相互转换 str通过encode()方法可以编码为指定的bytes; 相反bytes通过decode()方法可以解码为指定的str 如果我们从网络或磁盘上读取了字节流,那么读到的数据就是bytes。要把bytes变为str,就需要用 阅读全文
摘要:
Python decode() 方法以 encoding 指定的编码格式解码字符串。默认编码为字符串编码。 response.decode('encoding=utf-8', errors='ignore') response.decode('encoding=utf-8', errors='str 阅读全文