nov*_*ce3 5 python string unicode encode
我是Python的新手,所以也许我不能很好地表达它...
我有一个弦 '\xb9\xfe'
'\xb9\xfe'
我希望它以这种方式打印'\xb9\xfe',而不是转换为汉字'?'。
'?'
正确的做法是什么?
Mar*_*ers 5
使用原始字符串文字代替:
r'\xb9\xfe'
或打印repr()字符串的输出:
repr()
print(repr('\xb9\xfe'))
归档时间:
11 年,4 月 前
查看次数:
4087 次
最近记录:
7 年,8 月 前