python - 如何从 HexBytes 对象中获取十六进制字符串?
问题描述
>>> from hexbytes import HexBytes
>>> ...
>>> hb
HexBytes('0x53b983fe73e16f6ed8178f6c0e0b91f23dc9dad4cb30d0831f178')
我有一个 HexBytes 对象hb
,我想得到 '0x53b983fe73e16f6ed8178f6c0e0b91f23dc9dad4cb30d0831f178' 字符串,我该怎么办?
解决方案
你可以只输入hb.hex()
,它应该可以工作
推荐阅读
- c# - 如何读取另一个项目的 app.config 文件
- asp.net - 什么是 dotnet 主机版本?
- javascript - Angular HttpClient 响应与导航器预览不同,特殊字符未解码
- c - 编译器不断重复打印语句 - C 语言编程
- python - Python Flask REST API 在调用子进程命令期间冻结
- javascript - 在js中单击按钮时传递变量
- java - JPA Criteria API - 在 ElementCollection 外键上使用 WHERE 条件加入 ElementCollection
- java - 了解日期格式 2019-10-16 02:37:08.000+000
- java - 从 CSV 文件读取解析错误/问题
- marklogic - 如何安全地解耦 MarkLogic 集群?