is there a way of having an (yet unkown) function as an argument of a function in python:def doSomething(<func>):    #do something with func()at a later stage, functions could be defined, eg:def f1(x):    return x*xdef f2(x):    return x+1and I could call now:doSomething(f1,x1)doSomething(f2,x1) 
Python function (or set of functions) as input of a function or class
python
Functions are perfectly normal objects in Python, so the answer is yes.def callFunctionTwice(func, arg):    func(arg)    func(arg)def f(a):    print(a)callFunctionTwice(f, hmm)  # Prints hmm twice