解决python中 f.write写入中文出错的问题 一个出错的例子#coding:utf-8s=u'中文'f=open("test.txt","w")f.write(s)f.close()原因是编码方式错误,应 f.write