json
import json str=['abb',456,True,False] # json_str=json.dumps(str) # with open ('test.json','w') as f: # f.write(json_str) # with open ('test.json','w') as f: json.dump(str,f) # with open ('test.json','r') as f: # res=f.read() # json_res=json.loads(res) # print(json_res) # print(type(json_res)) with open('test.json','r') as f: res=json.load(f) print(res) print(type(res))