解决python中print中文乱码的问题

 在脚本的开头添加下面三行代码就可以了

import sys
import io

sys.stdout=io.TextIOWrapper(sys.stdout.buffer,encoding='utf8')

猜你喜欢

转载自blog.csdn.net/ljl86400/article/details/109757315