Answers for "check if the file exists or not"

2

check if a file exists

>>> import os
>>> os.path.isfile("d:\Package1\package1\fibo.py")
True
>>> os.path.isfile("d:/Package1/package1/fibo.py")
True
>>> os.path.isfile("d:\nonexisting.txt")
Posted by: Guest on August-25-2020

Code answers related to "check if the file exists or not"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language