Python输出不了中文怎么解决
发布时间:2025-09-21 14:19:58

添加到文件头#encoding:utf-8即可。
相关推荐:Python教程
#encoding:utf-8
print'helloworld'
printu"学习"
print(unicode("学习",encoding="utf-8"))shell输出:
helloworld 学习 学习
还可以用#-*- coding: UTF-8 -*- 来指定。
下一篇 python写文件怎么读出来
