I trying to convert string to Binary and I think I'm not making the proper use of binascii. Bellow is my code:
import binascii
name = 'Bruno'
for c in name:
print ("The Binary value of '" + c +"' is", binascii.a2b_uu(c))
The result is not what I expected, as you can see below:
The Binary value of 'B' is b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
The Binary value of 'r' is b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
The Binary value of 'u' is b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
The Binary value of 'n' is b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
The Binary value of 'o' is b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
What do I need to change to get the binary value in 0s and 1s?