title: How to add pass class to class arguments and put in list
body: <p>I am new to python</p>
  <p>There are several classes that need to be passed to the function of another class, I don't quite understand how to do this.</p>
  <p>there is a class Driver:</p>
  <pre><code>class driver():
      type = &quot;driver&quot;
      def __init__(self, Name, Srnm, Exp):
          self.setName(Name)
          self.setSrnm(Srnm)
          self.setExp(Exp)
  
      def setName(self, t):
          self.__Name = t
      def setSrnm(self, t):
          self.__Srnm = t
      def setExp(self, t):
          self.__Exp = t
  </code></pre>
  <p>there is a class truck:</p>
  <pre><code>class truck():
      type = &quot;car&quot;
      def __init__(self, Number, Mark, CarCap):
          self.setNumber(Number)
          self.setMark(Mark)
          self.setCarCap(CarCap)
          
      def setNumber(self, t):
          self.__Number = t
      def setMark(self, t):
          self.__Mark = t
      def setCarCap(self, t):
          self.__CarCap = t
  </code></pre>
  <p>there is a class dirigeer:</p>
  <pre><code>class dirigeer():
      lst = []
      def add(self, c, d):
          self.lst.append([c,d])
  </code></pre>
  <p>main.py:</p>
  <pre><code>d1 = m1.driver('Vasya', 'Vasin', 4)
  c1 = m1.truck('A666AA', 'Ford', 100)
  
  c = m1.dirigeer
  c.add(c1, d1)
  </code></pre>
  <p>If i do this without transferring data, then everything works out for me. If I try to pass to a class, then I get the following errors:</p>
  <pre><code>File &quot;main.py&quot;, line 34, in &lt;module&gt;
      constructor()
  File &quot;main.py&quot;, line 18, in constructor
      c.add(c1, d1)
  TypeError: add() missing 2 required positional arguments: 'c' and 'd'
  </code></pre>