py2的str是bytes, 为什么能写中文?

如上图, py2的str是bytes, 为什么能写中文?

阅读 1.5k
1 个回答
This is because the Python 2 bytes object is simply an alias for Python 2’s str, rather than a true implementation of the Python 3 bytes object, which is substantially different.

https://python-future.org/byt...

推荐问题