读取两个txt文档,生产一个键值对
# -*- coding:utf-8 -*-
# 生产键列表
f = open(r'key_list.txt', 'r')
a = [i.replace('\n', '') for i in f]
# 生成值列表
f2 = open(r'value_list.txt', 'r')
b = [i.replace('\n', '') for i in f2]
# 转变成键值对
dict_list = dict(zip(a, b))
print(dict_list)