reading and writing of binary filesopening filefilepointer=open(filename,modefilename with extensionbinmodes"rbread opens binary file for reading "wbwrite opens binary file for writing /overwriting egf=open('demo bin','rb'#creating demo bin file gedit demo bin #write python program to read the data in demo bin file =open('demo bin','rb'print( read() close(creating empty bin file gedit empty bin write python program to write the data into empty bin =open('empty bin','wb' =[ , , =bytearray(lf write( close(#to view the contents in empty bin =open('empty bin','rb'print( read() close(#to overwrite the content in existing file demo bin =open('demo bin','wb' =[ , , =bytearray(lf write( bv prasanthi,dept of cse page