I am trying to print in a documents bits 1 an 0 and I have the next code
from bitarray import bitarray
a = bitarray()
a.append(True)
a.append(False)
a.append(True)
print(a)
f = file("bits.dat","wb")
f.write(a)
f.close()
It seems that it works but when I open the document bit.dat appears an error that I do not known how to solve.
Any ideas?