【Python】中文编码乱码问题

xiaoxiao2021-02-28  126

若Python载入时有中文字符,print时不输出中文,可以在添加以下代码:

import sysre load(sys) sys.setdefaultencoding('utf-8')

 

转载请注明原文地址: https://www.6miu.com/read-28656.html

最新回复(0)