Set File Path in Python | Delft Stack
www.delftstack.com › howto › pythonSep 12, 2021 · Use the pathlib.Path() Function to Specify the File Path in Python. In Python 3.4 and above, we can use the Path() function from the pathlib module to specify the file paths in Python. Its use is similar to the os.path() function. See the code below. from pathlib import Path print(Path('C:', '/', 'Users')) Output: C:\Users