import os def disAllPyFlie(dirpath): l1=os.listdir(dirpath) for item in l1: if os.path.isdir(dirpath+'/'+item): disAllPyFlie(dirpath+'/'+item) elif item.contains('.py'): print(item) disAllPyFlie('D:/aa')
import os def disAllPyFlie(dirpath): l1=os.listdir(dirpath) for item in l1: if os.path.isdir(dirpath+'/'+item): disAllPyFlie(dirpath+'/'+item) elif item.contains('.py'): print(item) disAllPyFlie('D:/aa')