how to write individual bits to a text file in python?,"struct.pack('h', 824)"