python 查找代码

code

import os
import shutil

pwd=os.getcwd()

for i in os.listdir(pwd):
    d=os.path.join(pwd,i)
    if(os.path.isdir(d)):
        for j in os.listdir(d):
            f=os.path.join(d,j)
            if("文字" in j or "python" in j.lower()):
                shutil.move(f,pwd)

原文地址:https://www.cnblogs.com/sea-stream/p/13920991.html