Accepted Answer · #29 · 2026-05-03
Which answer is correct?
Difficulty 1/3
How to play
Read the Stack Overflow–style question, then pick the one correct answer from four plausible options. Watch out — wrong answers often have high fake votes.
What's the proper way to read a file in Python?
I need to read the contents of a text file. I know about `open()` but want to make sure I'm handling resources correctly.
pythonfilescontext-manager
Loading your progress...
Press 1 through 4, or tap a numbered choice, to answer. Back to hub