Discuss / Python / 有没有汉译的官方文档啊 老阔疼 不过应该没有

有没有汉译的官方文档啊 老阔疼 不过应该没有

Topic source

tycoonBrain

#1 Created at ... [Delete] [Delete and Lock User]

import json

obj = dict(name = '晓明',age = 20,nu = 'huiui')

s = json.dumps(obj,ensure_ascii = False)#{"name": "晓明", "age": 20, "nu": "huiui"} 

h = json.dumps(obj,ensure_ascii = True)#{"name": "\u6653\u660e", "age": 20, "nu": "huiui"}

print(s,'\n',h)

print(chr(int('6653',16)),chr(int('660e',16)))#晓 明

# 如果ensure_ascii为True(默认值),则输出保证将所有输入的非ASCII字符转义。如果确保ensure_ascii为False,这些字符将原样输出。

関谷薫

#2 Created at ... [Delete] [Delete and Lock User]

左上角不是可以切换语言吗,简繁中文都有


  • 1

Reply