import os
def searchWithSuffixxes(dir,suffixes,slist=[]):
    for lists in os.listdir(dir):
        path = os.path.join(dir,lists)
        if os.path.isfile(path):
            if path.endswith(suffixes):
                dirc,fileNm = os.path.split(path)
                slist.append(dirc+"\\"+fileNm)
        if os.path.isdir(path):
            searchWithSuffixxes(path,suffixes,slist)
        return slist

 

相关文章:

  • 2021-05-25
  • 2021-09-29
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-03
  • 2021-11-18
相关资源
相似解决方案