class Fruit:
def
init_ (self, data = {‘color’: ‘unknown’ }) :
self._data = data
def set_color(self, color: str):
self._data[“color”] = color
def print_data(self) :
print(f”I’m {self._data.get (‘color’ )}.”)
orange = Fruit()
orange. set_color (“orange”)
orange.print_data()
Python:
I’m orange.
apple = Fruit()
apple.print_data()
I’m orange
Python:
THIS IS FINe.
GIPHY App Key not set. Please check settings