I'm trying to validate if a directory received as user input exists using the os module
This is how I'm accepting the input:
directory = input("Hi ! \n please type a directory, thanks !")
The idea is that I want to make sure the user will type an existing directory and nothing else
Have you read the docs for the os
module?
Check out the following two links:
Return True if path refers to an existing path.
Return True if path is an existing directory.