我如何储存中国价值观(漢字漢字漢字) 在变量中
x = u'\u6f22\u5b57\u6f22\u5b57\u6f22\u5b57'
x
u'\u6f22\u5b57\u6f22\u5b57\u6f22\u5b57'
print x
漢字漢字漢字
y = str(x)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-5: ordinal not in range(128)
目前没有回答
相关问题 更多 >
编程相关推荐