Dolby Interview Question

2: Explain file reading and writing in python