how to write individual bits to a text file in python?,"open('file.bla', 'wb')"