def run_thrice(f, a): print(type(f)) f(a) f(a) f(a) run_thrice(lambda z : print(z) , 4) from math import sin run_thrice(sin, 5)