路径操作:
判断*是否存在,返回的是bool类型:
os.path.isdir() # 是否是一个目录 os.path.isfile() # 是否是一个文件 os.path.exists() # 文件/目录是否存在
查找目录*下文件名所有包含“.py”的文件:
python 文件操作
原文:https://www.cnblogs.com/caizhanjin/p/11306402.html