coding: utf-8
list1 = list(range(len(d)))
for p in d:
# print(p[1], p[2], p[3])
list1[paranum] = {“ParaId”: p[1], “Sentence”: p[2], “Sentence_cn”: p[3]}
paranum += 1
data = [json.dumps(w, ensure_ascii=False) for w in list1] #列表解析
result = "{data: [" + ','.join(data) + "]}" ###我这个地方为了在数据库存储时 方便VS窗体读取,在最外面加了{data:[ 这里存放内容 ]}