import os def file_exists(file_name): if os.path.exists(file): return '%s is found' % file_name else: return '%s is missing' % file_name