input: Write a function to create a Python class that represents a 3-dimensional vector with methods to initialize the vector and calculate its length. The class should have an `__init__` method to set the x, y, and z coordinates and a `length` method to compute the Euclidean distance from the origin. If the vector is initialized with no arguments, the coordinates should default to 0.
  
  Output:
  class Vector3D:
      def __init__(self, x=0, y=0, z=0):
          self.x = x
          self.y = y
          self.z = z
      
      def length(self):
          return (self.x**2 + self.y**2 + self.z**2)**0.5
  
  assert Vector3D(1, 2, 2).length() == 3.0
  assert Vector3D(3, 4, 0).length() == 5.0
  assert Vector3D().length() == 0.0
output: class Vector3D:
      def __init__(self, x=0, y=0, z=0):
          self.x = x
          self.y = y
          self.z = z
      
      def length(self):
          return (self.x**2 + self.y**2 + self.z**2)**0.5