废话不多说上代码
import os
import json
path1 = 'data'
dict1 = {'a':'a','b':'b','c':{},'d':[]}
if not os.path.exists(path1):
os.mkdir(path1)
with open(path1+'/1.json','w') as f:
josn.dump(dict1,f)
废话不多说上代码
import os
import json
path1 = 'data'
dict1 = {'a':'a','b':'b','c':{},'d':[]}
if not os.path.exists(path1):
os.mkdir(path1)
with open(path1+'/1.json','w') as f:
josn.dump(dict1,f)