input: Write a function to design a python class to represent a 3-dimensional vector with methods to support vector addition and subtraction. The class should contain a constructor to initialize the vector components, a method to print the vector, a method to add two vectors, and a method to subtract two vectors.
  
  class Vector:
    
      def __init__(self, x, y, z):
          self.x = x
          self.y = y
          self.z = z
    
      def printVec(self):
          print(self.x, self.y, self.z)
    
      def addVec(self, V):
          return Vector(self.x+V.x, self.y+V.y, self.z+V.z)
    
      def subVec(self, V):
          return Vector(self.x-V.x, self.y-V.y, self.z-V.z)
  
  assert Vector(1, 2, 3).printVec()==None
  assert Vector(1, 2, 3).addVec(Vector(1, 1, 1)).printVec()==None
  assert Vector(1, 2, 3).subVec(Vector(1, 1, 1)).printVec()==None
  assert Vector(1, 2, 3).addVec(Vector(2, 3, 4))==Vector(3, 5, 7)
  assert Vector(1, 2, 3).subVec(Vector(2, 3, 4))==Vector(-1, -1, -1)
output: 
  class Vector:
    
      def __init__(self, x, y, z):
          self.x = x
          self.y = y
          self.z = z
    
      def printVec(self):
          print(self.x, self.y, self.z)
    
      def addVec(self, V):
          return Vector(self.x+V.x, self.y+V.y, self.z+V.z)
    
      def subVec(self, V):
          return Vector(self.x-V.x, self.y-V.y, self.z-V.z)
  