Lesson 2 of 4Module 2 · 0% of course
Explore › CS, Python & AI Engineering › Python Foundations › Objects & reliability
Python Foundations · Objects & reliability

Files, CSV & pathlib

Read and write files safely with `with`, parse CSVs into dicts, and handle paths with pathlib so your scripts work on any machine.

25 min · 7 steps · videoJump to quiz ↓
Python Tutorial: Pathlib - The Modern Way to Handle File Paths Corey Schafer · 30 min
Open in YouTube
Step 1 of 7 · Overview25 min read ·
Key idea
Prereqs: Conditionals & loops, Errors & testing. Next: Classes & objects. Mirrors CS50P week 6 (File I/O).
Next: 1. Opening a file the right way
‹ PrevNext ›