python中读写文件时str和byte的编码问题

每次遇到编码报错都百度一发而后挨个试,感受劳神费力。。索性今天就看一看这个编码是怎么个用法编码 str--编码-encode-->bytespa byte--解码-decode-->strcode 例如:string str=bytes.decode(encoding="ansi")百度 bytes=str.encode(encoding="ansi")coding 一个直观的例子:margin
相关文章
相关标签/搜索