Normalize a file path
Return a platform-correct Path made from a base directory and relative parts.
What you’ll practice
This Level 6 exercise focuses on pathlib.Path in the Professional curriculum. Solve the challenge prompt above using clear, idiomatic Python and the relevant language or standard-library tools.
Relevant Python reference: pathlib — Object-oriented filesystem paths.
Sample Test Cases
make_path('/app', 'data', 'users.json')Path('/app/data/users.json')Further Reading
Reference Solution
Reveal Reference Solution
def make_path(base: str, *parts: str): from pathlib import Path return Path(base).joinpath(*parts)Pro Tips & Keyboard Shortcuts
Open VS Code Color Theme Quick Pick to select from 20 dark and light themes.
Open practice settings drawer to toggle line numbers, indenting, font size & hints.
Expand sidebar menu, focus search bar, and highlight search text instantly.
Instantly highlight and focus code editor from anywhere, restoring cursor right where you left off.
Collapse sidebar and close all popups or settings drawers for clean focus view.