Python 遍历 寻找空文件夹

import os
sourceDataPath = r'X:/PM210513163247708'
for home, dir, file in os.walk(sourceDataPath):
    if len(os.listdir(home)) == 0:
        print(home)
print("finished!")
    原文作者:fK0pS
    原文地址: https://blog.csdn.net/Hodors/article/details/118962152
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞