python- ASCII字符串转为16进制格式_i未若的博客-CSDN博客_pythonascii码16进制
代码#!/usr/bin/python3hexForamt="\\x"# 更改这里的ASCII字符串asciiStr="AAABBBccc"def ascii2hex(asciiStr): #字符串转为16进制 hexInitData=asciiStr.encode().hex() #拼接为\x格式 hexFinalData='' for i in range(0, int(len(hexInitData)), 2): he...
https://blog.csdn.net/qq726232111/article/details/118961303