第二步:将字符串转化为list

第三歩:将两个list合并为dict

第四步:将dict转换为接送数据

如:
   import json

  keys = ['a', 'b', 'c']

  values = [1, 2, 3]

  dictionary = dict(zip(keys, values))

  j = json.dumps(dictionary)

  print(j)

 

#运行结果:{"a": 1, "b": 2, "c": 3}

 

相关文章: