I created a to-do list type app. In the application, the user can create his own new task. However, after closing the application, not all tasks were saved. Can this be fixed by authenticating/registering each user to save data or something? How can I fix this? Same problem with the web
I'm new to programming and don't know how to change this.
In application, you can use an .txt file to store data.
Or you can create another python file which will be 1 big dictionary with users, it can be named
users.py. When someone is registered, you will simply add one's name into dictionary and this account will have a list of strings which will contain all to-dos. Then, when the user logs in account, you will read all data from this list and display it on the screen.An alternative for this is to use JSON file, but you will have to import JSON module.