判断某文件是否存在 os.path.exists(file_path)
删除某文件: os.remove(file_path)
import os
file_path="d:/mk.txt"
if os.path.exists(file_path)==True:
os.remove(file_path)
判断某文件是否存在 os.path.exists(file_path)
删除某文件: os.remove(file_path)
import os
file_path="d:/mk.txt"
if os.path.exists(file_path)==True:
os.remove(file_path)