How to implement an automatically expiring variable in python? For example, Let the program running For one hour. I want implement an array of 6 variables, each variable in
It sounds like the items in your array know about each other, because otherwise they'll all expire at the same time.
I think you want to create a subclass of list which deletes its contents after a certain time.