Answer
In python we can check if the file exists or not by a builtin function from os library. We can use the following command
os.path.exists(filepath)
This function will return True if the file exists False otherwise. To use this function we need to import the os module first.
Work Step by Step
Same as above.