How to check if it is a folder in Python• 1 min
Another Python programmer's best friend, the os.path.isdir() method.
When your are building an archive system that will store all your processed data it might come in handy to use the os.path.isdir() method.
This method will check whether the selected path is a folder.
Here is the code
Here you are! You now know how to check if a path is a folder using the os.path.isdir() method.
More on fundamentals
If you want to know more about Python fundamentals without headaches... check out the other articles I wrote by clicking just here: