I need to open a file for reading and writing. If the file is not found, it should be created. It should also be treated as a binary for Windows. Can you tell me the file mo
open("filename", "a+b")
should work. It opens a binary file in append/update mode.