Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 297 Bytes

README.md

File metadata and controls

14 lines (11 loc) · 297 Bytes

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)