python-以-utf-8-格式写文件JAY.LIN 收录于 Python 2022-09-11 约 61 字 预计阅读 1 分钟 目录 python 以 utf-8 格式写文件python 以 utf-8 格式写文件关键词由CSDN通过智能技术生成python 以 utf-8 格式写文件 import codecs f = codecs.open('test.txt', 'w', 'utf-8') f.write('中文') f.close()Please enable JavaScript to view the comments powered by Giscus.