Python, Programming, Data Science, Artificial Intelligence, Data.
@property def strategy(self): return self._strategy @strategy.setter def strategy(self, strategy): self._strategy = strategy def execute_strategy(self, a, b): return self._strategy.execute(a, b) context = Context(ConcreteStrategyAdd()) result = context.execute_strategy(3, 4) print(result) # Output: