f=open("a.csv","r",encoding='utf-8')
x=[]
for line in f:
x.append(line)
f.close()
code=[]
for x1 in x:
c=x1.split(",")
code.append(c[2])
dic=[]
for c1 in code:
h=0
if c1 in dic:h=100
if h<50:
dic.append(c1)
g=open("data.csv","r",encoding='utf-8')
x1=[]
for line in g:
x1.append(line)
g.close()
cx=[]
tx=[]
for x2 in x1:
c3=x2.split(",")
cx.append(c3[9])
tx.append(c3[7])
dicx=[]
namex=[]
for u in range(len(cx)):
h=0
if cx[u] in dicx:h=100
if h<50:
dicx.append(cx[u])
namex.append(tx[u])
q=[]
for u in range(len(dicx)):
h=0
if dicx[u] in dic:h=100
if h<50:q.append(namex[u])
print(q)
g2=open("ren.txt","w",encoding='utf-8')
for line2 in q:
g2.write(line2+"\n")
g2.close()
最終更新:2018年01月29日 04:03