Say that I have a 4 character string, and I want to convert this string into a byte array where each character in the string is translated into its hex equivalent. e.g.
s = "ABCD"
b = bytearray(s)
# if you print whole b, it still displays it as if its original string
print b
# but print first item from the array to see byte value
print b[0]