Remembering variables - Python
I am trying to make the code remember variables from a past run(for example lets say you ran a repl today and you save and quit so next time you run the repl it has your data saved.) I want a way to have it save the data
To save the variables permanently, you need to use a database. I would suggest using SQLite or the ReplitDB. You can just store the variables there.
You can set the variable values to the database by using db["key"] = "value" In your case "value" is the value of the variable and "key" is whatever you want to identify the variable by. To get the variable and display it you can just use value = db["key"] and then print(value). Lastly, if you want to delete the variable, just use del db["key"]. Just remember to import db from replit before this. In a python repl, you can view the commands in the cylinder icon on the left.