PythonSampleProject class Rectangle: def init(self, length:int,width:int): self.length = length self.width = width def __iter__(self): yield {"length":self.length} yield {"width":self.width} rect = Rectangle(10,5) for attr in rect: print(attr)