Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- with open("birthday.json", "rb") as handle:
- family = json.load(handle)
- print type(family)
- key = raw_input("key: ")
- value = raw_input("Value: ")
- family[key] = value
- print family
- print type(family)
- with open("birthday.json", "wb") as handle:
- json.dump(family, handle)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement