🎯 What you'll learn: Reading and writing text files with open() and the with statement. All file modes (r, w, a, r+). Reading methods: read(), readline(), readlines(). CSV files with the csv module. JSON files with json. Working with file paths using pathlib.
1-B 2-B 3-B 4-B | 5 w 6 closes 7 = with open('notes.txt') as f: 8 = with open('out.txt','w') as f: f.write('Hi') 9 = 'w' overwrites; 'a' appends to the end | 10 = It closes the file automatically, even on errors