Discuss / Python / 练习

练习

Topic source

Solo_Travel

#1 Created at ... [Delete] [Delete and Lock User]

import os t="aa"

def filename(f): fs=os.listdir(f) for f1 in fs: path=os.path.join(f,f1) if not os.path.isdir(path): if t in f1: print("文件:%s"%path) else: pass else: filename(path) path="D:\下载\python安装" filename(path)


  • 1

Reply