I have a long Hex string that represents a series of values of different types. I wish to convert this Hex String into a byte array so that I can shift each value out and co
provided I understood correctly, you should look for binascii.unhexlify
import binascii a='45222e' s=binascii.unhexlify(a) b=[ord(x) for x in s]