title: Why has my output for dot not been added? Then, when I print(dot), it shows the add __str__?
body: <pre><code>class Vector3D:
      def __init__(self, x, y,z):
          self.x = x
          self.y = y
          self.z = z
  
      def __add__(self, other):
          return Vector3D(self.x + other.x , self.y + other.y , self.z + other.z)
  
      def __mul__(self, other):
          return Vector3D(self.x * other.x , self.y * other.y , self.z * other.z)
  
      def __str__(self):
          if self.__add__(self):
              return '[X = %.2f, Y = %.2f, Z = %.2f]' % (self.x , self.y, self.z)
          elif self.__mul__(self):
              return '%d' % (self.x + self.y + self.z)
          else:
              return 0
  
  v1 = Vector3D(1,2,3)
  v2 = Vector3D(4,5,6)
  v3 = v1 + v2
  print(v3)
  dot = v1 * v2
  print(dot) 
  </code></pre>
  
  <p>Why has my output for dot not been added? Then, when I call <code>print(dot)</code>, it shows the add <code>__str__</code>? </p>
  
  <pre><code>"[X=5.00,Y=7.00,Z=9.00]"
  "32" 
  </code></pre>