Mar-06-2020, 01:38 PM
That looks nice. But what is your question? What is going wrong?
Indeed the data is stored in a dictionary with the name "emails". When you end the program this dictionary should be saved to a file with pickle and when you start it again the data should be read from this file.
I see only two problems.
The first time you start the program there will be no file. So the file has to be created with an empty dictionary.
Then in main() you call the function load_emails() which is defined later. Perhaps you should put main() near the end of the program.
Indeed the data is stored in a dictionary with the name "emails". When you end the program this dictionary should be saved to a file with pickle and when you start it again the data should be read from this file.
I see only two problems.
The first time you start the program there will be no file. So the file has to be created with an empty dictionary.
Then in main() you call the function load_emails() which is defined later. Perhaps you should put main() near the end of the program.