I\'m trying to find a way to print a string in hexadecimal. For example, I have this string which I then convert to its hexadecimal value.
my_string = \"deadbeef
Another answer with later print/format style is:
res[0]=12 res[1]=23 print("my num is 0x{0:02x}{1:02x}".format(res[0],res[1]))