I have a binary value that is stored in a variable. How do I convert it to decimal value or hex value??
t = '0b'+bin(0o202)[::-1][:-2]
So the value of the t would be
t = '0b01000001'
I need the value of the t converted to decimal or hex.
I have a binary value that is stored in a variable. How do I convert it to decimal value or hex value??
t = '0b'+bin(0o202)[::-1][:-2]
So the value of the t would be
t = '0b01000001'
I need the value of the t converted to decimal or hex.