Answer the question
In order to leave comments, you need to log in
How to save in json correctly?
I have a dict of this format:
main_dict = {}
main_dict["key_1"] = "valie_1"
main_dict["key_2"] = "valie_2"
with open("PATCHS/my_dicts.json", "a", encoding="utf-8") as file:
json.dump(main_dict, file)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question