Stop Using Python Strings To Represent File Paths!

# Benefits of ‘pathlib’

Liu Zuo Lin
Level Up Coding
Published in
3 min readJul 19, 2023

--

We probably learn to deal with files and file paths pretty early on in our Python journey. We might use a string folder/subfolder/subsubfolder to represent a certain filepath.

I still use normal Python strings to build these filepaths until recently. But, working with large enterprise Python applications for a…

--

--