title: Make variable common to all subclasses
body: <p>I want a class <code>temp</code> with a variable <code>a</code>, and its two subclasses <code>c1</code> and <code>c2</code>. If <code>a</code> is changed in <code>c1</code>, it should also be reflected in <code>c2</code> and vice-versa. For this, I tried:</p>
  
  <pre><code>class temp(ABC):
  
      a=1
  
      def f(self):
          pass
  
  class c1(temp):
  
      def f(self):
          print(self.a)
  
  class c2(temp):
  
      def f(self):
          print(self.a)
  
  o1=c1()
  o2=c2()
  o1.f()
  o2.f()
  o1.a+=1
  o1.f()
  o2.f()
  </code></pre>
  
  <p>It gives me output:</p>
  
  <pre><code>1
  1
  2
  1
  </code></pre>
  
  <p>whereas I want it to be </p>
  
  <pre><code>1
  1
  2
  2
  </code></pre>
  
  <p>I also tried <code>super.a</code> instead of <code>self.a</code>, but it gives me an error. How can I achieve the desired target? Thanks...</p>