- 博客(1)
- 收藏
- 关注
转载 python 字符串,bytes和hex字符串之间的相互转换
import binasciidatastr='13'#string 类型转换为bytedataByte=str.encode(datastr)#byte串 转换为16进制 byte串 ,比如 b'12' 转换为b'3132'a=binascii.b2a_hex(dataByte)#16 进制byte串 转换为string串,比如b'3132' 转换为"3132",用来显示print(...
2019-03-28 17:25:00 399
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人