What I'm trying to do, is backup a dictionary into a text file. This is what my code looks like so far:
with open("dict.txt","r") as dict_file:
text = dict_file.read()
my_dict = text
Of course, this makes a variable called 'my_dict' but saves what is in the text file as a string.
Inside the text file, I have this:
{"test":["test0","test1"],"dict":["dict0","dict1","dict2"]}
If you are wondering why I'm doing this, it is for a challenge I am doing with my friends where we have to make a user-database thing with importing and exporting users to a text file.