C.W.K.
Stream
Quiz · 3 questions

📁 Files & I/O — Talking to the Disk

pathlib / JSON / CSV / pickle / mmap / streaming

Level 0Curious
0 XP0/93 lessons0/23 achievements
0/100 XP to next level100 XP to go0% complete

Quiz

01Why should you always specify encoding="utf-8" when opening text files in Python?
Hint
What changes between operating systems for text-mode files?
02Why must you open CSV files with newline=''?
Hint
Two layers of newline handling — and they fight.
03What's the difference between Path.read_text() and open() + f.read()?
Hint
Convenience method that wraps a with open() block.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.