def my_wrapper(func1): def func2(l): ll = ''.join(reversed(l)) func1(ll) return func2 @my_wrapper def my_print(l): print(l) if __name__ == '__main__': l = input() my_print(l) # Here func2 returned by my_wrapper is called
Input: abcde
Output: edcba
Tested on Python 3.7
Коментари
Публикувай нов коментар