import os
import sys
import shutil
name1=[]
name=[]
n_list=[]
f=open('d:/py_code/1.txt','w')
for line in open('d:/py_code/full_name.txt'):
name1.append(line)
for line in open('d:/py_code/darknet-7_20180720.txt'):
#print(line,end='')
name.append(line)
for i in range(466248):
if i % 2==0:
n_list.append(name[i][-7:-1])
for i in n_list:
f.writelines(str(i)+'\n')
f1=open('d:/py_code/c1/c11.txt','w')
f2=open('d:/py_code/c2/c22.txt','w')
f3=open('d:/py_code/c3/c33.txt','w')
f4=open('d:/py_code/c4/c44.txt','w')
f5=open('d:/py_code/c5/c55.txt','w')
oldpath='D:/处理照片/1-310/'
newpath='D:/处理照片/c1/'
for i in range(233124):
if str(n_list[i]) == ' car_1':
f1.writelines(str(name1[i]))
elif str(n_list[i]) == 'car_c1':
f2.writelines(str(name1[i]))
elif str(n_list[i]) == 'car_c2':
f3.writelines(str(name1[i]))
elif str(n_list[i]) == 'car_c3':
f4.writelines(str(name1[i]))
elif str(n_list[i]) == ' car_4':
f5.writelines(str(name1[i]))
最有成就感的代码