title: How to use define parent object in python using inheritance?
body: <p>I wish to make a class System with arguments : <code>sysname</code>,<code>temp</code>,<code>N</code></p>
  
  <p>and make a child class Molecule which uses inheritance to get parameters from System. </p>
  
  <pre><code>class System() :
      def __init__(self,sysname,temp,N):
          self.sysname=sysname
          self.temp=temp
          self.syslist=[]
          self.N=N
  
  
  class Molecule(System) :
      def __init__(self,name,position,mass,radius):
          self.name=name
          self.position=position
          self.mass=mass
          self.radius=radius
          self.epsilon=1
          self.sigma=1
          self.syslist.append(self)
  </code></pre>
  
  <p>I can make an instance of System as</p>
  
  <pre><code>System1=System("system1",100,10)
  System2=System("system2",120,10)
  </code></pre>
  
  <p>Now while defining a molecule, how do I a define which system does it belong to?</p>
  
  <p>Also, please tell if there is something else wrong with my class definitions </p>