What is the preferred / normal way to store user input when running a Python script if I need data again the next time the script is run?
For example, my script performs calculations based on what the user enters, and then when the user runs the script again, it extracts the result from the last run.
Now I write the data to a text file and read it from there. I do not think that I will need to store very large records (less than 100, I would say).
I am targeting Windows and Linux users with both this script and a cross-platform solution. My only concern with using a text file is that I believe this may not be the best and usual way to do this.
So my question is: if you ever need to store some data for your script, how do you do it?
source share