Welcome to Day 5! Today we shift from volatile, temporary in-memory variables to persistent storage and application durability. You will learn how to interact safely with your operating system's file system, read/write structured industry data patterns, handle real-world operational crashes gracefully, and keep execution timelines documented using professional logging architectures. 💾

1. File Handling & pathlib 📄

Python's pathlib module treats file paths as smart object structures instead of plain text strings. This avoids bugs caused by differing slash directions across operating systems (Windows uses \, while Mac/Linux use /).

Reading ("r"): Loads file contents into memory.

Writing ("w"): Erases any existing file contents and writes a fresh payload from scratch.