Advertisement
Guest User

Untitled

a guest
Nov 19th, 2010
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. def write_json(fileName, structure):
  2.     f = open(fileName, mode='w')
  3.     json.dump(structure, f, indent=2)
  4.     f.close()
  5.  
  6. def read_json(fileName):
  7.     read = open(fileName, 'r')
  8.     structure = json.load(read)
  9.     read.close()
  10.     return structure
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement