编号45

如何检查文件是否存在?


提问于2019-07-23 10:21    3051 已解决

站长回答


您可以用

import os.path
os.path.exists(file_path)
或者

os.path.isfile(file_path)