AttributeError: 'bytes' object has no attribute 'hex'

python3.5之前bytes数据没有hex()属性

需要使用

''.join(map(lambda x:('' if len(hex(x))>=4 else '/x0')+hex(x)[2:],a))

方法替换,两者功能相同
posted @ 2019-05-16 17:22  没有显示名称  阅读(5571)  评论(0)    收藏  举报