We can easily use multiple decorators on one function itself.
Keep in mind the order of decorators matters. In this example, the measure_time
decorator here measures the time for running the function twice. That is, it includes the do_twice
decorator's time within it. Try swapping the order of the decorators and see the output.