+ 1
How do I write a program in PYHTON to accept a string and display it in binary?.
BINARY
3 Respuestas
0
I would do:
str = "hello world"
' '.join (map(bin,bytearray(are, 'utf8')))
or use the binascii module like:
import binascii
bin (int (binascii.hexlify(st),16))
0
thanks
0
Mr.simon, sir, I tried the same program which you sent but it doesn't seem to work