How do i change binary to hex in phyton | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How do i change binary to hex in phyton

I understand the changing hex to binary as maths but it is hard in phyton

6th Dec 2016, 10:24 PM
sahra
1 Answer
+ 1
It is very easy change binary to hex in python. For example: 10101011 to hex >>> hex(0b10101011) '0xab' your hex value: ab
9th Dec 2016, 8:54 PM
Constantin E.
Constantin E. - avatar