python 字符编码的两种方式写法:# coding=utf-8和# -*- coding:utf-8 -*-
生活随笔
收集整理的這篇文章主要介紹了
python 字符编码的两种方式写法:# coding=utf-8和# -*- coding:utf-8 -*-
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
python運行文件是總會出現亂碼問題,為了解決這個問題,在文件開頭加上:
# coding=utf-8 或者?
# -*- coding:utf-8? -*-
# coding=<encoding name>
or (using formats recognized by popular editors)
轉載于:https://www.cnblogs.com/my-blogs-for-everone/p/7878249.html
總結
以上是生活随笔為你收集整理的python 字符编码的两种方式写法:# coding=utf-8和# -*- coding:utf-8 -*-的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: AssemblyExecuteAdapt
- 下一篇: Python第十课 网络管理