Check if a dir exists

We will create a directory and the we will check if it exists, avoiding receiving an error message. We checked two ways to do it. The first uses os.path.isdir to check the presence of the directory, while the second uses the try except method to intercept the error.


Published by pythonprogramming

Started with basic on the spectrum, loved javascript in the 90ies and python in the 2000, now I am back with python, still making some javascript stuff when needed.