I'm writing something like a database, but rather simple and small. So I used a dict, which is then saved in a file.
The code is roughly:
d = {'apple': 1, 'bear': 2}
print(d, file=f)
I want it to be imported the next time I run it, i.e. import it as a dictionary from file, anyway to do it?