New to python and json. How would you go about opening several json files with "with open", then reading individually. Code below:
def read_json_file(filename):
with open("File1location/income","file2location/weather", "file3location/sun", 'r') as fp:
income = json.loads(fp.read())
return data
income = read_json_file(income)
print(len(income))
I need to print the length of each file, but how would I go about isolating each file?
Thanks