0 points

python - Convert hex to binary - Stack Overflow


dashboard

Mon Jun 22 2020 13:35:43 GMT+0000 (UTC)

Posted by @Amna #python

>>> format(integer, '0>42b')
'001010101111000001001000111110111111111111'
content_copy Copy

Use the builtin function, format Then pass to format.

https://stackoverflow.com/questions/1425493/convert-hex-to-binary