Question about Python two files

I am trying to make a python chat bot, sorta like Alexa, for my desktop that can store information about its user so that it can better help them. The problem I am running into is that when you close the program it forgets everything it just learned.

Is there a way to make python permanantly change a variable, so it will remember it the next time you open the program

There are several options. First its important to understand that when a python program run, it uses RAM (including the variables). RAM does not offer persistence storage.

For this, we would need to use the disk/hard drive. We could simply use files, which means at boot of your program, you will have to read from the file to continue from where you left of

depending on the exact requirements, a database might be a better choice then a databases

this is a very broad answer, there are different file types (CSV for example) we could use, different databases as well.

I guess if its pretty broad, than this is not an easy question. Would it be better for me to look online?

Also are there any code languages that would be better to use for what I am trying to do?

You can ask questions, that is fine. But you will also need to do research, and a tutorial might help indeed

no, python is a fine choice for your purpose. I would stick with python.

Generally speaking, when you close any program for it to be able to “remember” the previous session it has to utilise some form of permanent storage outside of the memory where it was being executed.

Python has the capacity to work with files which could be one way of persisting data…

Thank y’all. That was very helpful.
I would give both of y’all the solution mark but I dont think I can.