In brief
Pathlib combines folder and file names using the operating system’s path rules. After from pathlib import Path, the expression Path('reports') / 'sales.csv' builds a path without creating a file.
Useful to know
Pathlib combines folder and file names using the operating system’s path rules. After from pathlib import Path, the expression Path('reports') / 'sales.csv' builds a path without creating a file. [1]
Here, / joins components rather than dividing numbers. Reading or writing requires a separate operation. This distinction helps separate an intended location from whether data actually exists there.
Sources
For further detail and to check the information: