How To Use the pathlib Module to Manipulate Filesystem Paths in Python 3
Python 3 includes the pathlib module for manipulating file system paths agnostically whatever the operating system. pathlib is similar to the os.path module, but pathlib offers a higher level—and often times more convenient—interface than os.path. In this tutorial, we’ll go over some of the ways to use the pathlib module to represent and manipulate file system paths.