Skip to content
Sharp

Files and Paths · interview question

A teammate submits shaky pathlib code. Which review comment is the strongest?

Multiple choiceEasychapter-4-curatedpremiumfiles-and-pathspathlib
Choose one answer
Answer and explanation

Correct answer

A. Make the rule clearer and easier to explain. Use path objects so joins, names, and parent directories stay explicit and platform-safe.

Why

The best review comment anchors the change to readability, correctness, and future maintenance. Hand-built path strings are easy to get wrong and harder to review.

Test yourself on Files and Paths

A free test with instant, explained results. No account needed.

Start free test
All Files and Paths questions →