Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
import json
#make a test data.
testHash={"A":10,"B":20.0,"C":[30.0,40]}
#dump the variable as a file
with open("E:/test.json","w") as f:
json.dump(testHash,f)
#load from a json file
#with open("E:/test.json","r") as f:
# data=json.load(f)
#print data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment