第二步:将字符串转化为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}

 

相关文章:

  • 2022-02-27
  • 2022-12-23
  • 2021-12-24
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
  • 2021-12-12
  • 2022-12-23
  • 2021-10-17
相关资源
相似解决方案