I am creating a short text based game and am stuck on saving data in files so when the file is opened again the game can be continued with current stats etc.
I have already made it so when a new file is created text is saved in the format of a dictionary, so upon opening the file it is transferred to an in-code dictionary using (dict) = json.loads (text from file)
But I don't know how to get the variables back into the file
Thanks