title: How to change class instance outside the class with functions?
body: <p>I want to change few variables value from <code>class Person</code> present in <code>parent.py</code> file with <code>updated.py</code> file without changing original <code>class</code>.</p>
  <p><code>parent.py</code> file:</p>
  <pre><code>already_defined = &quot;no extra&quot;
  
  class Person(object):
      schoolname = 'ENT Medi'
      def __init__(self,firstname,lastname):
          self.address = &quot;{} {}&quot;.format(firstname,lastname) # **&quot;this req to change&quot;**
          print(self.address)
      def extra_curr(already_defined):
          newvar = &quot;somthing new&quot; # &quot;**this req to change**&quot;
          print(newvar)
  </code></pre>
  <p>This is my <code>updated.py</code> file:</p>
  <pre><code>from parent.py import *
  
  Person.schoolname = &quot;English Medium&quot;
  # Person.extra_curr.newvar = &quot;Changed to new&quot;
  
  new = Person()
  print(new.schoolname)  # -&gt; English Medium
  </code></pre>
  <p><code>Person.schoolname</code> change works, but how to change <code>self.address</code> and <code>newvar</code> which are inside <code>__init__</code> and <code>extra_curr</code>?</p>
  <p>How to insert external variable value inside the <code>class</code> without replacing original <code>class</code>?</p>
  <p>What I want is below changes without any further modification:</p>
  <pre><code>self.address = &quot;No address present&quot;
  newvar =&quot;just demo var&quot;
  </code></pre>