week-09.json
json Container
READ_ONLY_ACCESS
[ { "id": "python-w09-000", "front": "Week 9 Diagnostic: Why is it recommended to use `with open('file.txt', 'r') as f:` instead of `f = open(...)`?", "back": "Answer: B — The `with` statement acts as a context manager that guarantees the file descriptor is closed when the block exits." }, { "id": "python-w09-001", "front": "Week 9 Diagnostic: Which file open mode should be used to add data to an existing file without overwriting it?", "back": "Answer: C — Mode `'a'` (append) writes new data at the end of the file without clearing existing contents." } ]
Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.