赞
踩
当我为所有测试语料都用拼音命名完后,遇到要按不同的产品挑出对应词条的语料,在几千个文件里一次挑一个太慢了。挑几百个我就想歇菜了。
那可以不可以有个方法一次性挑出所有我想要的文件,答案是:有!
话不多说,上代码:
import shutil
import os
import string
inputFilePath= "E:\\test"
threefile = [ ]
key = "dakaikongtiao kaiji guanji guanbikongtiao shiliudu shiqidu shibadu shijiudu ershidu ershiyidu ershierdu ershisandu ershisidu ershiwudu ershiliudu ershiqidu ershibadu ershijiudu sanshidu sanshiyidu sanshierdu shenggaowendu jiangdiwendu tailengle tairele zhilengmoshi chushimoshi songfengmoshi zhiremoshi zuidafeng jianxiaofengsu zuixiaofeng zidongfeng zengdayinliang jianxiaoyinliang guanbijieneng dakaishengyin zuidayinliang zuixiaoyinliang guanbishengyin nuanfengmoshi PMVmoshi kongqiqingxin kongwenchushi jienengmoshi dakaidianfure guanbidianfure dianjiare guanbidianjiare dakaizhihuifeng guanbizhihuifeng gexingmoshi guanbig
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。