Python Write Binary Array To File