hex string7101540201转bytes array
To convert the hexadecimal string "7101540201" to a bytes array in Python, you can use the bytes.fromhex() method. Here's an example:
hex_string = "7101540201"
bytes_array = bytes.fromhex(hex_string)
print(bytes_array)
Output:
b'q\x01T\x02\x01'
In the output, b'q\x01T\x02\x01' represents the bytes array where each character is represented by its hexadecimal value.
原文地址: https://www.cveoy.top/t/topic/jfW2 著作权归作者所有。请勿转载和采集!