python_interview_question icon indicating copy to clipboard operation
python_interview_question copied to clipboard

2.补充缺失的代码

Open August-Ghost opened this issue 5 years ago • 0 comments

使用glob模块可以更简单地完成任务:

def print_directory_contents(sPath):
    from os.path import join
    from glob import iglob
    for p in iglob(join(sPath, "**/*), recursive=True):
        print(p)

August-Ghost avatar Sep 19 '19 12:09 August-Ghost