I want to take an input from someone and save it in a dictionary even after I end the program so that I can run it again and retrieve the information. How do I do this?
Asked
Active
Viewed 116 times
-1
-
You have to write the output (e.g. the key-values of a dictionary) in e.g.`.txt` file – Giorgos Myrianthous Mar 05 '17 at 23:14
1 Answers
1
You need to save the information to a file or database when the program ends and reload it when it starts. Pickle is one way you can do that.

Joseph Sible-Reinstate Monica
- 45,431
- 5
- 48
- 98