title: destroy object of class python
body: <p>Hi i'm trying to destroy a class object if the condition of an if statement(inside a while is met)</p>
  <pre><code>global variablecheck
  
  class createobject:
          def __init__(self,userinput):
               self.userinput = input
               self.method()
           
          def method(self):
               while True:
                  if self.userinput == variablecheck
                       print('the object created using this class is still alive')
                  
                   
                   else:
                      print('user object created using class(createobject) is dead')
                      #what code can i put here to delete the object of this class?
  
  
  </code></pre>