Convert a sequence of bits to a bit-string

te509 at york.ac.uk te509 at york.ac.uk
Sat Dec 15 09:06:28 EST 2007


Hi guys,
does anybody know how to convert a long
sequence of bits to a bit-string? I want to avoid this:

>>> bit=0011010000000000000111111111111111000000000000000001111111010111111111111001 
>>> str(bit)
'949456129574336313917039111707606368434510426593532217946399871489'

I would appreciate a prompt reply because I have my python assessment to 
submit. Thanks, Thomas




More information about the Python-list mailing list