Asked • 05/05/19

How to find if directory exists in Python?

In the `os` module in Python, is there a way to find if a directory exists, something like: >>> os.direxists(os.path.join(os.getcwd()), 'new_folder')) # in pseudocode True/False

1 Expert Answer

By:

Mitchell F. answered • 01/02/20

Tutor
New to Wyzant

Software Engineer Specializing in Python

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.