I have a .py script to modify a json file. However what I'm doing is loading a json file and then modify it with my code. What I have is the next:
if name=='main':
with open('example.json', 'r+') as file:
dictionary_data = json.load(file)
.
.(code)
.
.
.
new_file = open("modify.json", "w")
Is there any solution to automatize the json file? So when I'm using the command python3 main.py helloWorld.json
to generate a modify.json from that helloWorld.json file