binary string to hex python

Solutions on MaxInterview for binary string to hex python by the best coders in the world

showing results for - "binary string to hex python"
Khadija
28 Jun 2016
1binary_string = input('Input Binary: ')
2
3decimal_representation = int(binary_string, 2)
4hexadecimal_string = hex(decimal_representation)
5
6print(hexadecimal_string)