马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
import pandas as pd
import numpy as np
ciku_data = pd.read_csv('ciku.csv',header=None,names=['A','B'], encoding='utf-8')
A = ciku_data['A']
B = ciku_data['B']
dic = {"A[0]":B[0],"A[1]":B[1],"A[2]":B[2],"A[3]":B[3],"A[4]":B[4],"A[5]":B[5]}
with open('example.txt','r',encoding='utf-8') as f:
word_list = []
for line in f:
for word in line.split():
word_list.append(word)
for i in range(len(word_list)):
for j in range(len(A)):
if word_list[i] == A[j]:
print(A[j],B[j])
|