Dolby interview question

2: Explain file reading and writing in python