Challenge 1
Store the supplied text as a member named reports/summary.txt inside the newly opened ZIP archive.
from pathlib import Path
from tempfile import TemporaryDirectory
from zipfile import ZipFile
with TemporaryDirectory() as folder:
archive_path = Path(folder) / "reports.zip"
with ZipFile(archive_path, "w") as archive:
with ZipFile(archive_path) as archive:
assert archive.read("reports/summary.txt") == b"ready"
print("member written")
Press Ctrl⌘Enter to check your answer