标签:win lis os.path pen join python mdi 目录 list
def delete_dire(dire):
dir_list = []
for root, dirs, files in os.walk(dire):
for afile in files:
os.remove(os.path.join(root, afile))
for adir in dirs:
dir_list.append(os.path.join(root, adir))
for bdir in dir_list:
os.rmdir(bdir)
标签:win lis os.path pen join python mdi 目录 list
原文地址:https://www.cnblogs.com/dengtou/p/9831674.html