笔记:
python的字典转换为中文输出:
#coding:utf-8
import json
dic = {'张三':2,'李四':3,'王五':5}
print json.dumps(dic,encoding='utf-8',ensure_ascii=False)
笔记:
python的字典转换为中文输出:
#coding:utf-8
import json
dic = {'张三':2,'李四':3,'王五':5}
print json.dumps(dic,encoding='utf-8',ensure_ascii=False)
本文标题:python2的字典输入中文
本文链接:https://www.haomeiwen.com/subject/pomuoxtx.html
网友评论