目录

判断文件是否存在

import os
os.path.exists(test_file.txt)
#True

os.path.exists(no_exist_file.txt)
#False