【\u】字符示例
a = '\u5317\u4eac\u5e02'
print(a)
北京市
b = '\\u5317\\u4eac\\u5e02'
print(b)
\u5317\u4eac\u5e02
json.loads解析
import json
a = '\\u5317\\u4eac\\u5e02'
b = '"%s"' % a
c = json.loads(b)
print(a, b, c, sep='\n')
\u5317\u4eac\u5e02
“\u5317\u4eac\u5e02”
北京市
读取文件中\u字符

demjson
from demjson import decode # pip install demjson

524



被折叠的 条评论
为什么被折叠?



