Python, Programming, Data Science, Artificial Intelligence, Data.
print(decorator1.operation()) # Output: ConcreteDecoratorA(ConcreteComponent) decorator2 = ConcreteDecoratorB(decorator1) print(decorator2.operation()) # Output: ConcreteDecoratorB(ConcreteDecoratorA(ConcreteComponent)) In this example, we have a Component abstract base class with an operation