I wish to save a dictionary and a list in one json file so that when I parse the file I could distinguish them. This is the function I use to save the dictionary in the json file:
def save_callback():
#folder = filedialog.askdirectory()
file = filedialog.asksaveasfilename()
with open(file,'w') as file:
file.write(json.dumps(test_dict))
os.rename(file.name,file.name + ".txt")
What should I add to this function to save the list too?