human
Python how to write to a binary file?
assistant
Here is some code to write `newFileBytes` to a binary file `newFile`

newFile.write(struct.pack('5B', *newFileBytes))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.