How do you convert a bitstring (e.g. a string with only 0
and 1
) to its value in hex, using Python?
For example if I have the string "1010110010010001"
its output in hex would be: 0xAC91
.
How do you convert a bitstring (e.g. a string with only 0
and 1
) to its value in hex, using Python?
For example if I have the string "1010110010010001"
its output in hex would be: 0xAC91
.