Answers for "python string to binary hex string"

1

string to binary python

"hello".encode("ascii")
b"hello"
Posted by: Guest on October-19-2021
0

binary string to hex python

binary_string = input('Input Binary: ')

decimal_representation = int(binary_string, 2)
hexadecimal_string = hex(decimal_representation)

print(hexadecimal_string)
Posted by: Guest on June-19-2021

Python Answers by Framework

Browse Popular Code Answers by Language