Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- file_contents = []
- class temprange:
- def __init__(self, key, value):
- self.key = key
- self.value = value
- def readRJf():
- readFile = open("config.json", "r")
- contents = readFile.read()
- data = json.loads(contents)
- for key, values in data.items():
- file_contents.append( temprange(key, values) ) #storing updated file contents
- for obj in file_contents:
- print( obj.value, obj.key, sep = ' ')
- readRJf()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement