Python:unescape“xXX”

Python:unescape“xXX”,第1张

Python:unescape“ xXX”

您可以使用解码

string-escape

>>> escaped_data = '\x50\x51'>>> escaped_data.depre('string-escape')'PQ'

在Python
3.0
中没有

string-escape
,但是您可以使用
unipre_escape

从一个

bytes
对象

>>> escaped_data = b'\x50\x51'>>> escaped_data.depre("unipre_escape")'PQ'

从Unipre

str
对象:

>>> import precs>>> escaped_data = '\x50\x51'>>> precs.depre(escaped_data, "unipre_escape")'PQ'


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5640172.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-16

发表评论

登录后才能评论

评论列表(0条)

保存