Implement a context manager that emulates open() in memory.
Constraints
Example
>>> process_log("test.log", ["a", "b"])
("test.log", True, "a\nb\n")
>>> f = FakeFile("data.txt", "hello")
>>> with f:
... f.write(" world")
... print(f.read())
hello world
>>> f.closed
True
Recent Submissions
No submissions yet — hit Run Tests to try!
Hints