Contact: aviboots(AT)netvision.net.il
39,851 questions
51,772 answers
573 users
def test(): print("test()") def f(func): print("f()") print("call func()") func() # test() f(test) ''' run: f() call func() test() '''
import math def f(func): print("function: " + func.__name__) return func(3.14) print(f(math.cos)) print(f(math.sin)) ''' run: function: cos -0.9999987317275395 function: sin 0.0015926529164868282 '''