I have this line in my program: TextV = base64.b64decode('0cQ+bNsObaw=')
and the value of TextV
is b'\xd1\xc4>l\xdb\x0em\xac'
. Then I run this to convert TextV to binary:
TextVBin = ''.join(format(x, 'b') for x in bytearray(TextV))
and the value of TextVBin
is '11010001110001001111101101100110110111110110110110101100'
. Now, I wanna again convert TextVBin format to TextV format(i.e. b'\xd1\xc4>l\xdb\x0em\xac'
) But I googled and I couldn't find any answer. How can I do this in Python 3?