3 ms·
Another alternative, works on both py2/3, assuming you replace bbs='000... with bbs=b'000... import struct result=''.join([chr(int(bits,2)) for bits in st
by tyingq 11y ago
Another alternative, works on both py2/3, assuming you replace bbs='000... with bbs=b'000...
import struct
result=''.join([chr(int(bits,2)) for bits in struct.unpack('8p'*(int(len(bbs)/8)),bbs)])
print(result.replace(' ','')[::-1])