Content
class Fruit: def init(self, data ‘color’: ‘unknown’) : self. data data def setcolor (self, color: str): self. data "color" color def printdata(self): print (f"I’m self.data.get(‘color’)).") orange Fruit () orange.setcolor ("orange") orange.printdata () Python: I’m orange, apple Fruit () apple.printdata () l’m orange Python: THIS IS FiNE.