Rollo的Python之路Python 编码与解码

Posted rollost

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Rollo的Python之路Python 编码与解码相关的知识,希望对你有一定的参考价值。

Python 编码与解码:

1.0 解码:encoding = ‘utf-8/utf8/UTF-8/UTF8‘,要想解码,必须知道用什么方式编码的。

with open(test,r,encoding = utf-8) as e:
    print(e.read())

 

以上是关于Rollo的Python之路Python 编码与解码的主要内容,如果未能解决你的问题,请参考以下文章