处理文件 / 基本操作

import os.path

file_name = "file.txt"
exists = os.path.exists(file_name)
print(exists)