Python判断文件和文件夹是否存在

xiaoxiao2021-02-28  87

import os  os.path.isfile('test.txt') #如果不存在就返回False  os.path.exists(directory) #如果目录不存在就返回False
转载请注明原文地址: https://www.6miu.com/read-50849.html

最新回复(0)