字典,类似json
#!/usr/bin/python3 # -*- coding: UTF-8 -*- import json data={'name':'abc', 'age':{'zhousui':7, 'xusui':8}, 'class': 'first'} print(data) strJson=json.dumps(data) #json转字符串 print(strJson) jsonData=json.loads(strJson) #字符串转json print(jsonData)
标签:python,json,strJson,字段,dict,print,data From: https://www.cnblogs.com/ho966/p/17847880.html