def test(func):
print("this is funcion test")
def inner():
print("this is inner function")
return func
# return inner()
inner()
# test() #1
# print(test())
def test2():
print("this is test 2")
# test(test2) #1
a = test(test2)
a()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter