---

How to Check if a File or Directory Exists in Python

In Python, there are many different ways to check whether a file exists and determine the type of the file.