if the file is not a file :(return False)
import os.path
if not os.path.isFile(file_name):
print("The File s% it's not created "%file_name)
os.touch(file_name)
print("The file s% has been Created ..."%file_name)
And you can write a simple code based on (try,Except):
try:
my_file = open(file_name)
except IOError:
os.touch(file_name)