I have used this function to convert string to bits.
def a2bits(chars):
return bin(reduce(lambda x, y : (x<<8)+y, (ord(c) for c in chars), 1))[3:]
How would I go about doing the reverse? Bits to string. Would I have to separate the bits into ASCII numbers and then convert them into characters?
I got the function a2bits from this site: http://www.daniweb.com/software-development/python/code/221031/string-to-bits
Is there something in the standard library to convert bits to string?