python写中英文字符串到文本中

# -*- coding: utf-8
import codecs
txt = codecs.open('list.txt','w','utf-8')
txt.write(u'哈哈haha\n')

猜你喜欢

转载自blog.csdn.net/zhangjunbob/article/details/72764258