import json
book = '?C:\Users\wt271\Desktop\jc\passenger.txt'
book_list = []
with open(book) as b:
book_list = b.read().splitlines()
data = dict(zip(book_list))
print type(data)
print data
j = json.dumps(data)
print type(j)
print j
添加回答
举报
0/150
提交
取消