How do I know if an object has been deleted or not in python? I created an object of a certain class and I ran a function of that class inside a while loop. After a few seco