diff --git a/Python/decorator.py b/Python/decorator.py new file mode 100755 index 0000000..51b95ec --- /dev/null +++ b/Python/decorator.py @@ -0,0 +1,23 @@ +#!/bin/python3 +def print_canary(): + print(''' .-. \n''' + + ''' /'v'\ \n''' + + ''' (/ \) \n''' + + '''='="="===<\n''' + + '''mrf|_| \n''', + end='' + ) + +myBirdFunction = print_canary +myBirdFunction() + +def print_with_yellow(func): + def wrapper(*args, **kwargs): + print("\033[33m") + r = func() + print("\033[0m") + return r + return wrapper + +myBirdFunction = print_with_yellow(print_canary) +myBirdFunction()