【发布时间】:2020-02-08 07:36:18
【问题描述】:
path='C:/Users/ks/Downloads/AU/ORR/'
print (path)
substring = "w"
files = os.listdir(path)
for file in files:
src=path+file
if substring in file:
break
print ("there")
else:
print ("not there")
dst='Pattern_'+substring+str(org)+str(m1)+'.csv'
dst=path+dst
os.rename(src,dst)
打印语句仅用于调试。一切都在打印,但重命名功能仍然不起作用。
【问题讨论】:
标签: python-3.x selenium csv web-scraping jupyter-notebook