 Hi everyone, in this tutorial, I'm gonna be showing you how to check whether a file or directory exists by using Python language. I'm gonna write an example to show you how you can do that. In this example, we're going to use OS module. OS module is used in Python for path name manipulation. Now let's import OS module. Then I wanna use a path to check if it exists. I'm gonna open C drive on my machine and let's check, for example, if exists filepy.exe inside C Python 3 folder. I'm gonna copy this path and I'm gonna paste it here. We wanna search if py.exe file exists. Let's put this inside quotes and let's use a variable. I'm gonna call it path. If we want to check if this file exists, we're gonna use exists function from OS path module. I'm gonna use this exists method and I'm gonna provide this path to it. This exists method is from OS path module. Let's save the returning value of this function in a new variable. I'm gonna call it, for example, if file exists. And let's print results to our shell. I'm gonna print result of this OS path exists function. Let's run this code and as you can see, the answer is true. That means this file exists. If I change it a little bit and run it again, you can see that this file not exists on this path. That's all in this tutorial. Don't forget to subscribe to our channel. See you in the next tutorial. Happy coding.