input: Write a function to create a Python class called Rectangle that represents a two-dimensional rectangle with a length and width. The class should have an initializer to set the length and width, and a method to calculate the area of the rectangle. If the rectangle is instantiated with invalid dimensions (i.e., negative or zero values), raise a ValueError.
  assert Rectangle(5, 10).area()==50
  assert Rectangle(3, 4).area()==12
  assert Rectangle(0, 0)==ValueError
  assert Rectangle(-1, 5)==ValueError
  assert Rectangle(7, -2)==ValueError
output: class Rectangle:
      def __init__(self, length, width):
          if length <= 0 or width <= 0:
              raise ValueError("Invalid dimensions")
          self.length = length
          self.width = width
      
      def area(self):
          return self.length * self.width