I am trying to write a menu in which option 1 would add a key:value pair to a dictionary and option 2 would run a threading module using the items from the dictionary. Key is a message from the user input and Value is a number of seconds, from the user input, that a thread should pause for, before displaying the message.
Threading itself is irrelevant right now though. What I’m struggling with is the fact that when I use the function for option 1, it adds the key:value pairs to the dictionary successfully. But as soon as the function is finished the dictionary becomes empty again.
For a full description and the code please see this link.
Could somebody please help me figure this out?
Thank you in advance for your time and assistance.